There are three main types of objects in sentences: direct objects, indirect objects and objects of prepositions. For the most part, objects occur in the predicate of the sentence (the section following the verb). Identify them by picking out which words modify the subject's action. Ask yourself "what," "from whom" or "where" to determine the object. As an example, in the sentence "Erica ate a slice of pizza," ask yourself what Erica ate to determine your object.
Determining the direct object is the simplest of the three tasks. Direct objects answer the question "what" when put to the subject's actions. When speaking about sentence function, the subject acts upon the direct object. In the sentence, "He threw the pillow," "pillow" is the direct object because the subject actively uses it.
In some sentences, there is a beneficiary of the subject's actions. This beneficiary is known as the indirect object. The indirect object receives the direct object over the course of the sentence. For instance, in the sentence, "Sam gave Erica a slice of pizza," Sam (the subject) gives the direct object (slice of pizza) to Erica (the indirect object). The beneficiary may also be called the recipient in a sentence.
Though objects of prepositions appear similar to direct objects, the difference is that they occur in a prepositional phrase. It is important to remember that the addition of a preposition negates any possibility of the object being a direct object. Thus, in the sentence, "We walked around the garden," though the subject (we) acts upon the object (garden), the presence of the preposition (around) makes the object one of preposition.