Step 1: Understand what an object is:
An object is the word or group of words that receives the action of the verb.
It answers the question what or whom after the verb.
Example: In 'Ravi eats an apple', 'an apple' is the object.
Step 2: Direct object:
A direct object receives the action of the verb directly.
Ask 'what' or 'whom' after the verb to find it.
Example: She wrote a letter. Here 'a letter' is the direct object.
Step 3: Indirect object:
An indirect object tells to whom or for whom the action is done.
It usually comes before the direct object.
Example: She gave Ravi a book. Here 'Ravi' is the indirect object and 'a book' is the direct object.
Step 4: Quick check:
A sentence can have a direct object alone.
An indirect object appears only when a direct object is also present.
Example: The teacher told us a story. 'us' is indirect and 'a story' is direct.
Final Answer:
The two types of objects are the direct object (receives the action) and the indirect object (to whom or for whom the action is done).