Nine prepositions - in, an, auf, über, unter, vor, hinter, neben, zwischen - take the accusative when there is movement towards somewhere and the dative when there is not. Wohin asks about movement, wo asks about position.
Examples
- Wo ist der Bahnhof? Er ist in der Nähe.
- Where is the station? It is nearby.
- Gehen Sie geradeaus und dann nach rechts.
- Go straight ahead and then to the right.
- Ich gehe in die Apotheke.
- I am going into the pharmacy.
The mistake to avoid
In der Apotheke is being inside it; in die Apotheke is going in.
Where this fits in
Travel & directions, German A2: Get around in a German-speaking city: take transport, ask the way, check into a hotel, and buy a ticket.