What is a direct object?
Before learning the pronouns, let's understand what a direct object is. The direct object is the thing (or person) that receives the action of the verb. It answers the question "what?" or "whom?" after the verb.
For example: "I bought the book" - what did I buy? The book. "The book" is the direct object.
In Spanish, you can replace the direct object with a pronoun to avoid repeating the same noun over and over. This makes your Spanish sound much more natural and fluent.
Examples
To find the direct object, ask yourself: what is the verb acting on? "Compré ___" - what did I buy? That thing is the direct object.