Cases are something that you will meet everywhere in the German language. Basically every type of word can be affected by declension, also numerals and substantivised verbs.
Verbs can require Dativ, Akkusativ or both.
For example, "antworten" requires Dativ: Ich antworte *ihm*.
"sehen" requires Akkusativ: Ich sehe *ihn*
"geben" takes two objects, one in Dativ, one in Akkusativ: Ich gebe *ihm* (Dativ) *ein Buch* (Akkusativ).
Many verbs require that the objects are connected to the verbs with certain prepositions.
If you study German you'll have to learn the case(s) each verb demands.
For each verb, you will also have to study the preposition needed to connect the verb to the object. Also those who study English have to learn this, it's not a quirk of German.
Something similar can be said for Russian, by the way.