You use the genitive case to mark possession of something. It is a nice way to say that an object belongs to someone. There are some prepositions that trigger this case. In all cases you can use a simple test to check whether you need a genitive by asking 'wessen'/'whose'? If the word you're looking for is the answer to this question, you use the genitive case before!