Articles and other determiners
Der Schulleiter hat den Eltern einen Brief geschickt. (plural dat.) The headmaster sent the parents a letter.
As you should learn every new German noun together with its de nite article, you will know from the outset that a noun is masculine, feminine or neuter, which is more or less a matter of rote learning, and thus all you have to think about is what case is required in a given context. If you understand the general make-up of a sentence, i.e. who is doing what to whom, deciding on the appropriate case is easy.