Objects indicate the person or thing 'affected' by the verb phrase. They do not clearly indicate how the object is affected; one must work this out from the meaning of the verb, from context or by common sense. Traditional grammars often distinguish 2 or 3 types of objects: direct objects, indirect objects and reflexive objects. However, the ways that Spanish uses them is not always the same as in English.
In general, indirect objects identify the person or thing that gains or loses something as a result of the action of the verb, while direct objects are affected directly by the action of the verb without necessarily gaining or losing something.