Here's why:
* Direct object: The direct object is what the verb acts upon. In this sentence, the direct object is love because the teacher *gave* love.
* Indirect object: The indirect object receives the direct object. In this sentence, the children receive the love.
You can often identify the indirect object by asking "To whom?" or "For whom?" was the action performed. In this case, "To whom did the teacher give love?" - The answer is "children".