"He walks past the restaurant."
Translation:Han går forbi restauranten.
Sometimes they can be interchangeable, but not in this sentence. Bortenfor = beyond. Forbi = past. But forbi can also mean "on the other side of", which is literally bortenfor. But if you are just passing, forbi is the right choice.
Where is it? It's beyond/past the restaurant. Hvor er det? Det er bortenfor/forbi restauranten.