An object is the part of a sentence that gives meaning to the subject’s action of the verb. For example: Alice caught the baseball. Subject=Alice Verb=caught Object=baseball
A direct object answers the question of who(m) or what. In the sentence above, you could determine that ‘baseball’ is a direct object by asking the question: What did Alice catch? She caught the baseball. Baseball is the direct object.
An indirect object answers the question of to whom, for whom, or for what. For example: Max pitched Alice the baseball.
Max (subject) pitched (verb) the baseball (direct object) to whom? He pitched it to Alice. Alice is the indirect object.
To learn more about sentence structure, read this blog post about verb tenses.