POSITION: Words that describe position such as inside, on top of, below, beside.
PLACE: Words that describe place such as far from, close to, in front of.
longe (far)
perto (close)
dentro (inside)
fora (outside)
em cima (above)
debaixo (beneath)
em frente (in front)
atrás (behind)
ao lado (to the side)
All of these must be followed by a de (of).
Beneath the bed. > Debaixo da cama.
On top of the table. > Em cima da mesa.
In front of the hotel. > Em frente do hotel.
If the de is followed by an o, a (articles) or an ele, ela (pronouns) you must combine (contract) the de with it. For example,
de + a = da > Eu estou longe da cidade. (I'm far from the city.)
de + ele = dele > Nós moramos perto dele. (We live close to him.)