The prepositions in (in), an (at;
attached to), auf (on top of), vor (in
front of; before), hinter (behind),
über (above, over), unter (under,
beneath), neben (beside; next to) and
zwischen (between) require either the accusative case
or the dative case, depending on the situation. If a sentence
describes an action that results in a change of location, the
accusative is called for. If the action is stationary, the dative
is called for. Examples:
Sie wohnt in der Stadt. (She lives in the
city.)
Sie geht in die Stadt. (She is going into the
city.)
Er legt das Buch auf den Tisch. (He is putting the
book on the table.)
Das Buch liegt auf dem Tisch. (The book is laying on
the table.)
Er hängt das Bild an die Wand. (He is hanging
the picture on the wall.)
Das Bild hängt an der Wand. (The picture is
hanging on the wall.)
Wir setzen uns zum Picknick unter einen Baum. (We are
sitting down under a tree for our picnic.)
Wir sitzen zum Picknick unter einem Baum. (We are
sitting under a tree for our picnic.)
Gehst du ins Restaurant? (Are you going to the
restaurant?)
Warst du im Kino? (Were you at the movie theatre?
(US) or : Were you at the cinema? (UK) )