him
The word 'ihm' in German is a personal pronoun that is used to refer to a male person or a non-human male noun. It is used in the dative case, which is used to indicate the indirect object of a sentence. For example, 'Ich gebe ihm das Buch.' (I give him the book.)
I gave it to him.
This sentence uses the dative 'ihm' (him) to indicate the indirect object of the sentence -- the person to whom something was given.
He threw a ball to him.
This sentence again uses the dative 'ihm' (him) to indicate the indirect object -- the person to whom the ball was thrown.
That belongs to him.
This sentence uses the dative 'ihm' (him) to express possession.