Why English doesn't force the choice, and Spanish does
English marks the direct/indirect distinction with word order and prepositions, not with different pronoun forms. I saw her and I gave her the book use the exact same word, "her," whether she's the one being seen or the one receiving something. Nothing about the pronoun itself tells you which role she's playing; the sentence structure does that work instead.
Spanish keeps the two roles as separate pronoun families, but the families mostly overlap: me, te, nos, os work identically whether the pronoun is direct or indirect. The two sets diverge only in the third person, singular and plural, which is exactly the spot where English speakers, who've never had to track this distinction in their own pronouns, run into trouble. It's the same underlying pattern as saber and conocer: English collapses a distinction into one word or one form, Spanish keeps it split, and the split is what actually has to be learned.
Direct object pronouns: what receives the action
The direct object is the person or thing the verb acts on directly, the answer to "what?" or "whom?" The forms are me, te, lo/la, nos, os, los/las, and lo/la/los/las agree in gender and number with the noun they replace.
Veo el parque. → Lo veo. (I see it.) Compro las manzanas. → Las compro. (I buy them.) Conozco a tu hermano. → Lo conozco. (I know him.) In each case, the pronoun takes the place of the exact thing the verb is acting on, and it has to match that thing's gender and number.
Indirect object pronouns: who the action is for
The indirect object answers "to whom?" or "for whom?": the recipient or beneficiary of the action, not the thing being acted on. The forms are me, te, le, nos, os, les, and unlike lo/la, they don't change for gender: le covers "to/for him," "to/for her," and "to/for you (formal)" alike.
Escribo una carta a mi hermano. → Le escribo una carta. (I write him a letter.) Notice the letter itself isn't what le refers to; le points at the person receiving it. Spanish also commonly keeps the explicit a + noun phrase alongside the pronoun even though it looks redundant to an English speaker: Le doy el regalo a mi madre keeps both le and a mi madre, a real feature of Spanish (clitic doubling) rather than a mistake or an emphasis device.
When both show up together: le becomes se
A sentence can carry both a direct and an indirect object pronoun at once, and when it does, the indirect pronoun always comes first: Me lo dan (They give it to me), not Lo me dan.
Spanish also blocks a specific combination outright: le or les can never sit directly in front of lo, la, los, or las. Whenever that pairing would occur, le/les becomes se instead. Doy el regalo a mi madre → Le doy el regalo → replace the direct object too, and it becomes Se lo doy (I give it to her), never Le lo doy, which isn't a form that exists in Spanish. The swap is purely mechanical and applies every time, regardless of what se is standing in for.
Word order: before the verb, or attached after it
Object pronouns go immediately before a conjugated verb: Lo veo. Se lo doy. No la compro. They attach to the end of an infinitive or a gerund, and to an affirmative command, and attaching them shifts the stress, which usually requires a written accent to keep the pronunciation the same: Voy a comprarlo (or, just as correctly, Lo voy a comprar), Estoy comprándolo, Cómpralo.
Negative commands break that pattern: the pronoun goes back in front of the verb, not attached to it. No lo compres, never No cómpralo. That flip between affirmative and negative commands is one of the more common places learners default to the wrong order out of habit.
Leísmo, laísmo, and loísmo: the regional variation that actually matters
One regional swap is common enough that the RAE formally recognizes it as acceptable, not just as an error people happen to make. Leísmo is the use of le in place of lo for a masculine singular direct object that refers to a specific person: A Juan le vi ayer, alongside the standard A Juan lo vi ayer. Both are considered correct, and leísmo of this specific kind (masculine, singular, personal) is especially common in Spain; Latin American Spanish tends to stick with the standard lo.
The reverse swaps aren't accepted anywhere. Laísmo, using la/las for an indirect object, produces sentences like La dije la verdad, which is simply wrong; the correct form is Le dije la verdad (I told her the truth). Loísmo, using lo/los for an indirect object, produces Lo compré un regalo, also wrong; the correct form is Le compré un regalo (I bought him a gift). Both are treated as genuine errors by the RAE, regardless of region, unlike the masculine-personal leísmo case above.
This is the same kind of one-English-word-hides-two-Spanish-forms problem that shows up with por and para: the categories look interchangeable from the English side, and the only way through is to stop translating and ask what job the word is doing in the sentence.