They indicate the person or thing that is indirectly affected by the action of the verb.
Here are some examples:
* I gave *her* a book. (To whom did I give a book? To her.)
* He bought *them* a pizza. (For whom did he buy a pizza? For them.)
* The teacher explained the lesson *to us*. (To whom did the teacher explain the lesson? To us.)
Remember that indirect object pronouns always come before the direct object in a sentence.