A number of German prepositions always take accusative case such as the preposition durch (through). Other prepositions always take dative case such as mit (with). However, other prepositions can take either accusative or dative case. Such prepositions are known as dual prepositions.
The following German prepositions are dual prepositions:
in (in, into)
vor (in front of)
When a dual preposition answers the question where, dative case is used. If it answers the question where to, accusative case is used. Here are two sentences which illustrate this difference:
Die Leute gehen in die Kirche. (The people are going into the church).
Die Leute sind in der Kirche. (The people are in the church).
The first sentence uses accusative case and the second dative case. In the first sentence we can use the preposition "into" but in the second we must use "in."
German prepositions can be followed by accusative or dative case. However, a special class of prepositions, dual prepositions, can be followed by either. Accusative case corresponds to motion or direction and dative case to a lack of motion.