What is an indirect object?
While a direct object is the noun that receives the action of the verb, an indirect object is the noun that receives the direct object itself.
Examples of direct objects:
I fed the dog.
They found their wallet under the couch.
She accidentally spilled her drink.
If a sentence has a direct object, it does not always have to have an indirect object. However, some direct objects will affect any indirect objects which are present in the sentence.
I gave some food to the dog.
In the above example, ask yourself, "What was given by the subject?" The answer is food, which is the direct object of this sentence. Then ask yourself, "Is there anything in the sentence receiving the food from the subject?" Yes, the dog is receiving the food, and a noun that receives a direct object from the action of the verb is an indirect object.
There is another way to write the above example sentence.
I gave the dog some food.
Despite rearranging some of the words in the sentence, the meaning remains the same. What was given by the subject? The food. Who or what was given the food (the direct object)? The dog (the indirect object).
Writing sentences with direct and indirect objects like this (putting the indirect object before the direct object) may cause confusion at first, which is why the first example ("I gave some food to the dog") is a more clear way of expressing this idea.
Here are other examples of sentences that make use of direct objects with indirect objects:
The school awarded a diploma to her.
The school awarded her a diploma.
My employer gave me the keys to the company car.
My employer gave the keys to the company car to me.
The security door granted access to the person with the code.
The security door granted the person with the code access.
If you require more help with understanding indirect objects, please watch the video in the link provided.