For example:
They swam in the river.
Would 'in the river' be a prepositional phrase due to the preposition 'in' or would it be an adverbial phrase because it adds information to the verb 'swam'?
For example:
They swam in the river.
Would 'in the river' be a prepositional phrase due to the preposition 'in' or would it be an adverbial phrase because it adds information to the verb 'swam'?
There are different systems for describing grammar, so many concepts can be described with various terms depending on which system of terminology you're using. Sometimes it is more useful to refer to the components of a phrase, and sometimes it is more useful to refer to its function, so systems tend to have labels for both composition and function.
"In the river" is classified as a prepositional phrase, regardless of its function, in all systems of terminology that I am familiar with. The label "prepositional phrase" corresponds to the categorization of the word in as a preposition.
Some systems of terminology use the term "adverbial" to categorize the function of a phrase. In these systems, "in the river" in the sentence "They swam in the river" would be both adverbial in function, and a prepositional phrase in form. It doesn't stop being categorized as a prepositional phrase just because it is categorized as "adverbial". For further information on the meaning of "adverbial" and how it differs from "adverb", see the answers to this Linguistics SE question: Is the adverbial phrase and adverb phrase identical?
Other systems of terminology may refer to this function with another term like "verb phrase adjunct". Whatever you call it, an "adverbial phrase" is not the same kind of category as a "prepositional phrase", so it doesn't make sense to ask whether a phrase is one or the other: it might be both.
The answer is both.
Phrases are called after the head of their constituent elements. In such an analysis your sample is clearly a prepositional phrase (definition below). When discussing the meaningful units within the clause -- the sentence phrases -- the terminology used is noun phrases, verb phrases, and their component parts -- where, for instance, in addition to the verb, a verb phrase may also include a prepositional phrase.
On the other hand, when looking at the syntactic functions of clause elements, the terminology used is 'subject, verb (predicator), object, complement, adverbial'. An adverbial (from Dictionary) is
a word or phrase functioning as an adverb
In your example "in the river" is a prepositional phrase functioning as an adverb, i.e. an adverbial.
Here's a link (there are many others) which equates prepositional phrase with adverbials or adjectivals.
Prepositional phrases (adverbials/adjectivals)
These are formed from the head, followed by a noun phrase. Examples of prepositional phrases are in the teapot, on the toilet, and round the bend. They may be called adverbials since their usual function is to qualify a verb in the same way as an adverb does. You can test this by replacing a given prepositional phrase with an adverb - for example: Fred swam in the river and Fred swam swiftly. Both of these are grammatically standard forms. They may also function as adjectives: the pirate with the wooden leg.
So your sample can be called a prepositional phrase or an adverbial depending on the terminology you are using.
In the sentence,
They swam in the river.
the bolded phrase is a prepositional phrase. It does not change its phrasal type if it modifies a verb.
This Wikipedia entry for Head (linguistics) says:
In linguistics, the head or nucleus of a phrase is the word that determines the syntactic category of that phrase. For example, the head of the noun phrase boiling hot water is the noun water.
Note that the noun phrase doesn't need the surrounding sentence to determine that it's a noun phrase. Similarly, in the river speaks for itself and is a prepositional phrase.
This is an issue of the label for what something is vs the label for what it does.
'In the river' is a prepositional phrase. That's what you call it. Whatever its function, there's the preposition so you call it a prepositional phrase. To call it anything else is weird.
But you've noticed what it is used for. It seems to modify the verb or sentence (and that's what the phrase structure would show). In that capacity it acts like an adverb (because that's the name of things that modify verbs or adjectives or sentences).
You just don't call a prepositional phrase an adverbial phrase. Prepositional phrases can be used adverbially (but also adjectively, as when modifying a noun "The water in the river was cold").
But yes, 'in the river' is modifying 'swam', not 'they', so it is like an adverb.