What an indirect object pronoun does
The indirect object is the person something is given, said or sent to. In English you can say I give María the book or I give the book to María, and when you replace María, you get her, the same word you would use for a direct object. Spanish has its own set of pronouns for this role. Typical verbs are dar (to give), decir (to say), escribir (to write), contar (to tell) and enviar (to send).
From full phrase to pronoun
English puts object pronouns after the verb (I tell you). Like lo / la, Spanish puts them immediately before the conjugated verb.
Te digo la verdad.
I'm telling you the truth.
Le escribo una carta.
I write him / her a letter.
Les envío el documento.
I'm sending them the document.
The six forms
me, te, le, nos, os, les
| Person | Pronoun | English |
|---|---|---|
| 1st sg. | me | (to) me |
| 2nd sg. | te | (to) you |
| 3rd sg. | le | (to) him / her / you (usted) |
| 1st pl. | nos | (to) us |
| 2nd pl. | os | (to) you all (Spain) |
| 3rd pl. | les | (to) them / you all (ustedes) |
me, te, nos, os are identical to the direct object pronouns, just as English uses one word for both roles. The split happens only in the third person: indirect le / les versus direct lo / la / los / las. Gustar (Me gusta el café) works with these same pronouns.
Me envía un mensaje.
He / she sends me a message.
Nos cuenta una historia.
He / she tells us a story.
Os explico la lección.
I'll explain the lesson to you all.
le and les with a named person
Where English has three separate words, Spanish has one: le covers him, her and formal you, and les covers them and you all. a + person says who is meant. The pronoun still stays, even when the person is named. English would never say I give her the book to María, but in Spanish it is the normal sentence.
Le doy el libro a María.
I give María the book.
Le doy el libro a usted.
I give you the book. (formal)
Les doy el libro a mis padres.
I give my parents the book.
The "to" test has exceptions
Asking whether English could say to him works for most verbs (give, tell, write). A few verbs break it. Preguntar (to ask) takes le, even though English just says ask him: Le pregunto algo, not Lo pregunto algo. Ayudar (to help) takes lo / la: Lo ayudo.
Le pregunto algo.
I ask him / her something.
Lo ayudo.
I help him.