Some words can be both a preposition and an adverb. You can tell them apart because a preposition always begins a prepositional phrase. An adverb is not part of a phrase.
I stood up.
The word up is an adverb here. Up modifies the verb and tells how I stood. I stood up.
I walked up the stairs.
Here the word up is a preposition. Up begins the prepositional phrase up the stairs.
Here are more examples:
Adverb: I am going out.
Preposition: The boy walked out the door.
Preposition: Jim got off the bus.
Adverb: At the second stop, Jim got off.
Preposition: I can’t get across the street.
Adverb: This street is too busy to get across.
Some words can be both an adverb and a preposition. The word is a preposition when it begins a prepositional phrase. An adverb stands alone to modify the verb.