Replace nouns: I see it, I give her, I buy them
Direct object pronouns replace the thing or person receiving the action: me, te, lo, la, nos, os, los, las.
¿El libro? Lo leo. (The book? I read it.)
¿La película? La vi anoche. (The film? I saw it last night.)
¿Las llaves? Las tengo yo. (The keys? I have them.)
Unlike English, the pronoun goes before the conjugated verb.
Lo compro. (I buy it — literally "it I-buy".)
No la conozco. (I do not know her.) — no goes first
Indirect pronouns mark to/for whom: me, te, le, nos, os, les. Note le/les for him, her, them.
Le doy el libro. (I give him/her the book.)
Les escribo un correo. (I write them an email.)
¿Me prestas tu boli? (Will you lend me your pen?)
With ir a + infinitive, querer + infinitive etc., the pronoun can go before the first verb or attach to the infinitive. Both are correct.
Lo voy a comprar. = Voy a comprarlo. (I am going to buy it.)
Te quiero ver. = Quiero verte. (I want to see you.)
When both appear, the indirect comes first: me lo, te la, nos los... And le/les + lo/la becomes se lo / se la.
¿El regalo? Te lo doy mañana. (I will give it to you tomorrow.)
¿El libro a Juan? Se lo presto. (I lend it to him.)
Traps for English speakers
These are the errors English speakers make most often.