They are used when what you are talking about is an OBJETC, may it be direct or indirect.
Give it to HIM.
If you give something, you give it TO someone. Him is not doing anything, he´s not the subject of this action. He´s the object.
Object pronouns are me, you, him, her, it, us, and them.