To be honest, this is probably one of the hardest things to learn. Personally, my native language has 7 cases so having to choose between 4 (well, generally just 2...) often feels limiting.
But let's get to the thing, german language has 4 word cases, Nominativ, Genitiv, Dativ, Akkusativ. Nominativ is generally used for the subject in the sentence. Genitiv is the easiest to learn, it generally substitutes english preposition of, e.g. Farbe des Himmels (colour of the sky). It can also be used to express possetion, Seemannes Frau (sailor's wife). Genitiv is sometimes present in certain gramatical structures (e.g. während des Krieges), but these structures are always bound with this word case, your teacher schould be able to list them for You. Now Dativ and Akusativ can be tricky, they are usually used after a preposition. Luckily, there are lists of prepositions for each of these cases, as well as list of mixed prepositions. Dativ prepositions - aus, bei, mit, nach, von, zu, seit. Akkusativ prepositions - durch, für, gegen, ohne, um. There are also mixed prepositions, which can be used with both Dativ and Akkusativ. The distinguishing element between these two cases is the idea of direction. Dativ would be used if the action you are refering to is happening in the place you are talking about and Akkusativ in the other case, that is if the action spoken about is leading to place you are talking about. For example, Ich gehe in die Schule (Akkusativ), translated as I'm going to School, or I'm on my way to school, whereas Ich gehe in der Schule can be translated as I am walking in school. Again, your teacher will most likely provide you a better explanation. For the record, the mixed prepositions are: an, auf, hinter, in, neben, über, vor, zwischen. Though this may seem complicated, it can still be learned as there are rules describing these gramatical structures.
The real challange for someone whose language is caseless may be learning how to use word cases with verbs which lack prepositions, e.g. Ich lernte ihn kennen. Here I can only provide small advice, as I have never been taught something that is part of my native language. The Akkusativ is used when actions are done with people as whole and the Dativ is used then actions are done to people. This probably sounds really confusing now, but if you by any chance speak any other language with cases, it will help you a lot. All the slavic languages have cases that can be used as a clue in situations described in this paragraf, but then again, if you don't have cases in your native language, practice is the best way to learn.
PS: don't worry if you get a case wrong in german, the German are used to it and in fact, there are some places in germany where, while speaking dialect, cases are almost not used. Of course, if you need your german for a studying, then I guess you will really have to learn even the cases.