Quick answer
lo · la · los · las
They replace the thing being acted on — and they go before the verb, not after it.
The forms
| me | me |
| te | you |
| lo / la | him, her, it |
| nos | us |
| os | you (plural, Spain) |
| los / las | them |
Where they go
Before a conjugated verb. Attached to the end of an infinitive or gerund — your choice.
Agreement
The pronoun matches the gender and number of what it replaces.
Memory trick
English: "I have it." Spanish: "It I-have." Say it once that way and the order sticks.
Typical mistakes
Tengo lo.
Lo tengo.
The pronoun goes in front of the conjugated verb.
¿La coche? La tengo.
¿El coche? Lo tengo.
coche is masculine, so the pronoun is lo.
Check yourself
¿La carta? ___ escribí ayer.