Two-Way Prepositions and Destination
In German, a special group of prepositions—such as in, auf, unter, and neben—are known as "two-way prepositions" (Wechselpräpositionen). They can take either the accusative or the dative case.
When you are expressing motion towards a destination—answering the question Wohin? (Where to?)—you use the Accusative case for the noun following the preposition.
Remember your accusative definite articles: masculine der changes to den; feminine die and neuter das do not change.
Laying Flat (legen)
Use the verb legen when you are laying or putting something down flat. Notice how auf (on) and unter (under) are followed by accusative nouns.
Placing Upright (stellen)
If you are setting something down in an upright position, use the verb stellen. The destination requires the accusative case, shown here with auf and zwischen (between).
Hanging (hängen)
The verb hängen (to hang) works the same way. When you hang an object in a new spot, you are moving it to a destination. Here are examples using in (into), an (on a vertical surface), and über (over/above).
Moving to a Destination
This rule applies to any action that moves someone or something to a new place. Whether someone is running, walking, or throwing an item, if there is a destination, the two-way preposition takes the accusative.