They are used with the accusative when we talk about a direction like in these examples:
Wir fahren in die Türkei. We are driving into Turkey.
Geht ihr ins Kino? Are you going to the cinema?
Ich fahre an den Wannsee. I am driving to the Wannsee.
If you had to ask for the highlighted parts of the above examples, you‘d have to ask with Wohin? Where (to) in German as those verbs/situations imply a movement in some direction.
Wohin fahrt ihr? Wir fahren in die Türkei.
Wohin geht ihr? Wir gehen ins Kino.
Wohin fährst du? Ich fahre an den Wannsee.
Certain verbs imply a direction. E.g. the following ones:
gehen to go
fahren to drive
fliegen to fly
legen to lay / to put in a lying position
stellen to set / to put in a standing position
setzen to set / to sit down
kommen to come
They are used with the dative when we talk about a location or fixed position like in these examples:
Wir leben in der Türkei. We live in Turkey.
Seid ihr im Kino? Are you in the cinema?
Ich bin gerade am Wannsee. I‘m just at lake Wannsee.
If you had to ask for the highlighted parts of the above examples, you‘d have to ask with Wo? Where? in German as those verbs/situations imply a position or location.
Wo lebt ihr? Wir leben in der Türkei.
Wo seid ihr? Wir sind im Kino.
Wo bist du gerade? Ich bin gerade am Wannsee.
Certain verbs imply a location/fixed position. E.g. the following ones:
sein to be
bleiben to stay
sich befinden to be located
liegen to lie
stehen to stand
sitzen to sit
wohnen to live
Fußnote
*That means they are followed either by the accusative or the dative. There are also genitive prepositions but those are stuff for the higher levels. You might want to keep three of those in mind: laut, während, wegen.
This topic is covered in: A2-L12 and A2-L13.