A pronoun is a word that is used in place of a noun, often to avoid repetition. If we are replacing the object of a sentence with a pronoun, we will be using either the direct object pronoun (DOP) or indirect object pronoun (IOP).
The DOP (me, te, le/la/l', nous, vous, les) replace the direct object, as the name suggests. In other words, they 'suffer' or 'undergoes' the action of the verb. For example, 'je mange le pain' will become 'je le mange' because the bread suffers from the effects of my eating.
The IOP (me, te, lui, nous, vous, leur) replace the indirect object of the sentence. Therefore, they 'receive' the action, which is intended to/for it. For example, It is usually the equivalent of à/pour + person/thing. For example, 'je parle à Pierre' becomes 'je lui parle'