Prepositions that take the Accusative case
durch through
gegen against
um around
für for
ohne without
Preps. that take the Dative case
aus out (of), from (country, town or place)
mit with, by means of (transportation)
von from (person, open space, or direction), by
seit since, for
bei near, at, at home of or place of business
nach after, to (cities and countries)
zu to (mostly people and specifically named buildings)
gegenüber across from
außer except for, besides
Preps. that take the Genitive case
während during
trotz in spite of
anstatt instead of
wegen because of
Preps. that may take Acc. or Dat.
an at, to, on (vertical surfaces, denotes border or limiting area)
auf onto, on (horizontal surfaces), to (some public buildings)
hinter behind
in in, into (building, enclosed space, feminine or plural countries)
neben beside, next to
über over, above, across, about
unter under, below, among, beneath
vor in front of, before
zwischen between

Accusative:  movement & direction
Dative:  location & position
Er hängt das Bild über das Sofa.
He hangs the picture over the sofa.
Das Bild hängt über dem Sofa.
The picture hangs over the sofa.
Stell es unter den Tisch.
Put it under the table.
Es ist unter dem Tisch.
It is under the table.
Fahren Sie den Wagen hinter das Haus.
Drive the car behind the house.

Der Wagen steht hinter dem Haus.

The car is behind the house.

Stellen Sie die Flaschen vor die Tür.
Put the bottles in front of the door.
Die Flaschen stehen vor der Tür.
The bottles are in front of the door.
Stell es auf den Tisch.
Put it on the table.
Es liegt auf dem Tisch.
Its lying on the table.
Schreib es an die Tafel.
Write it on the board.
Es steht an der Tafel.
It is on the board.
Er geht in die Küche.
He goes into the kitchen.
Er ist in der Küche.
He is in the kitchen.
Stellen Sie es neben das Haus.
Put it beside the house.
Es ist neben dem Haus.
It is beside the house.
Stell die Lampe zwischen das Sofa und den Tisch.
Put the lamp between the sofa and the table.
Die Lampe steht zwischen dem Sofa und dem Tisch.
The lamp is between the sofa and the table.
Note:  Stellen, legen and setzen use the accusative case, while
stehen, liegen and sitzen use the dative case.