Dative: recipient and partner
The dative often marks the person who receives something or is affected indirectly. Some verbs, including helfen and danken, require it.
Ask wem? — to whom or for whom?
Masculine and neuter use dem/einem; feminine uses der/einer.
Dative plural uses den and the noun often gains -n: den Kindern.
With geben, the person is usually dative and the thing is accusative.
Ich helfe dem Mann.
Ich gebe der Frau das Buch.
Wir danken einem Kind.