Prepositions are little words that describe the location of something, or where it’s going, like for, to, in, on, over, under in English. In German, they change the case of the noun that follows them. In order to know which case to use, partly you just have to learn them. Certain prepositions always take the dative: aus, außer, bei, gegenüber, mit, nach, seit, von, zu. Some prepositions always take the accusative: für, um, durch, gegen, ohne, bis, entlang. Songs, games and mneumonics can help you to memorise these: or try writing them out and getting friends and family to do spot tests on you.
However, some prepositions, known as Wechselpräpositionen, can take either the accusative or the dative. These tricky prepositions are: an, auf, hinter, in, neben, über, unter, vor, zwischen. This is where it gets more complicated, but the simple way to remember when to use which case is that you use accusative when there is movement in the sentence and dative when there is not.
For example, the sentence “Tina sitzt im (=in dem) Kino” (Tina is sitting in the cinema) uses the Dative, because Tina isn’t going anywhere: it’s describing her position. However, if you wanted to say “Tina is going into the cinema”, you would say “Tina geht ins (=in das) Kino”, because it’s describing a movement. It’s like how in English you say somebody is lying in bed if they’re already there, but they get into bed if it’s something that happens in the course of the sentence. Another way of thinking about it is that you use dative to answer the question where? and accusative to answer the question where to?/where are they going?
Often the difference is easier to demonstrate with more examples:
Ich hänge das Bild an die Wand ( I hang the picture on the wall)= ACCUSATIVE, because the picture is moving
Das Bild hängt an der Wand (The picture is hanging on the wall)=DATIVE, the picture isn’t moving
Sonntags geht Steffi in den Park (Steffi goes to the park on Sundays)= ACCUSATIVE, because she’s going to a place
Steffi isst im (in dem) Park viel Eis (Steffi eats lots of ice cream in the park)= DATIVE, because it describes WHERE she is, rather than where she’s going
If this is quite daunting to get your head around, there are some cheats. Look for the verb in the sentence: if it’s a verb that describes an action, such as gehen (to go), setzten (to put) , stellen (to place), legen (to lie something flat), then the preposition will probably take the accusative. If it’s a verb that describes a state of being such as stehen (to stand), sitzen (to sit) or liegen (to lie there), then chances are the preposition will take the dative.