What is an example of an indirect object in a sentence?

In sentences, indirect objects receive the direct object and answer the question “for whom?” or “to whom.” For example, in the sentence “I gave the teacher my homework,” “the teacher” is the indirect object. It answers the question “To whom did I give my homework?”