The accusative case is used when there is movement from one point to another. For example, in the sentence, "Ich gehe in die Stadt" which means "I'm going into town" we use the accusative case, as this implies the person has moved from one location to another. However, in the sentence "Ich bin in der Stadt" "I am in town/ in the city", we use the dative case, as the person is saying they are in a certain location, and no movement is implied.