Direct Object Pronouns and Indirect Object Pronouns are placed either directly before a conjugated verb or attached to an infinitive, a gerund or a command. When both a direct and an indirect object pronoun occur with the same verb, the indirect object pronoun always comes first.
DOP - direct object pronoun IOP - indirect object pronoun
he or it (formal)
him, her, it, you (formal)
you all (familiar)
them, you all (formal)
Mi amiga me compra el libro. - My friend buys the book for me.
Mi amiga me lo compra. - My friend buys it for me.
Ya nos lo dijeron. - They already told (it to) us.
Véndamelos. - Sell them to me!
If the letter l occurs as the first letter of both the indirect object pronoun (le, les) and the direct object pronoun (lo, la, los, las), the indirect object pronoun is changed to se.
le lo: Se lo di a ella. - I gave it to her.
les la: Se la mandé a ellos. - I sent it to them.
le los: Se los regalaremos. - We will give them to him/her.
Let's look at some example sentences:
Ahora mismo se lo traigo.
Right now I am bringing it to him.
Ustedes se lo llevarán.
You all will take it.
El hombre se los da.
The man gives it to them.
El anciano se lo manda.
The elderly man sends it to him.