Some words may function as either prepositions or adverbs in a sentence. Here are some examples: in, out, before, behind.
When they stand by themselves, these words modify other words. When used with an object, they form prepositional phrases.
Here are some examples.
In:
He just stepped in. Modifies the verb “stepped,” therefore an adverb.
There is no one in the house. Used as a preposition to form the prepositional phrase “in the house.”
Out.
She just went out. Modifies the verb “went,” therefore an adverb.
She threw the clothes out of the window. Used as a preposition to form the prepositional phrase “out of the window.”
Before
He came before. Used an adverb to modify the verb “came.”
She stood before the table. Used as a preposition to form the prepositional phrase “before the table.”
Behind.
I lingered behind. Used as adverb to modify the verb “lingered.”
He hid the shoes behind the door. Used as preposition to form the prepositional phrase “behind the door.”