Direct object
The direct object tells us who or what receives the action of the verb
Example
I wrote an eassay
eassay = direct object
Indirect Object
An indirect object tells us to whom or for whom an action is done. A sentence with an indirect object must also contain a direct object
Example
My father bought me a lovely present
me = indirect object ; present = direct object