With adverbs other adverbs, adjectivs or verbs can be specified.
specifying a verb:
He runs fast.
specifying another adverb:
He runs very fast.
specifiying an adjective:
He is very angry.
There are a lot of words that can be preposition and adverb. The adverbs refere to a verb, another adverb or an adjective. The preposition describes the relationship between two objects. In English exists even words that can be adverb, preposition and conjunction.
preposition: He comes before midnight.
adverb* : I said that before.
conjunction: He did it before he knew that.
* Actually it is a pronominal adverb, because it refers to something. The question is before what? In some cases the adverb and the pronominal adverb have different forms. It is under the table. <=> It is underneath. (Not: It is under.))
It is useful to see that, because there is no guarantee that a word that serves in English as a preposition and as an adverb, has both functions as well in Portuguese and vice versa.
Furthermore it is useful to see the difference between an adverb and an adjective, because you have no guarantee that if there is no difference between the adverb and the adjective in English there is no difference as well in Portuguese.