Direct object pronouns (me, te, lo, la, nos, los, las) replace the nouns that receive the action of the verb to avoid repeating of the noun used.
Indirect object pronouns (me, te, le, nos, les) replace the nouns that indirectly receive the action of the verb to avoid repetition.