An object is a grammatical role a noun phrase or pronoun can fill. A verb can have a direct object and sometimes an indirect object. A preposition can also have its own object. In Mara mailed a letter, the whole phrase a letter is the object of mailed.

How to recognize it
Find the verb or preposition, then identify the noun phrase or pronoun that completes it in an object role. Ask what was sent, whom it was sent, or what follows the preposition.
Examples explained
Three types of object
Direct object. In Mara sent a letter, a letter tells us what she sent.
Indirect object. In Mara sent Leo a letter, Leo is the recipient and a letter remains the direct object.
Object of a preposition. In Mara sent a letter to Leo, Leo is the object of the preposition to.
Objects and subject complements
In Mara became a pilot, a pilot identifies what Mara became. It describes the subject, so it is a subject complement. Compare Mara hired a pilot, where the same phrase is the direct object of hired.
Common mix-up
A noun phrase after a verb is not always an object. After became, it can identify the subject as a subject complement.
Quick check
In “Mara sent Leo a letter,” what is the direct object?
Reveal the answer and explanation
A letter is what Mara sent. Leo is the indirect object, naming the recipient.