The object of a preposition is the noun, pronoun, or noun phrase that follows it and completes its meaning. Test: ask what? or whom? right after the preposition. On the table, on what? Table.
Noun, the most common type: The keys are in the drawer, in what? The drawer.
Pronoun: Give it to her, to whom? Her.
Noun phrase, the whole phrase counts, with the head noun answering the question: We sat near the old oak tree, near what? The old oak tree, headed by tree.
Gerund, an -ing form acting as a noun: She is good at swimming, at what? Swimming.
Compact field guide: types and examples
Clauses as heads. A clause can act as the head of the object phrase, as in the decision depends on how much evidence exists; the question on what? points to the clause, not a single noun.
Intervening modifiers. The head noun usually follows the preposition closely, but modifiers can come between them: in a debate about the genuinely hard cases, the head cases answers about what?, with the genuinely hard in between.
A second preposition nearby. Sometimes a preposition takes a phrase containing another preposition, as in out of the woods; here woods serves as the head of the whole object phrase of out of.
A second preposition nearby. Sometimes a preposition takes a phrase containing another preposition, as in out of the woods; here woods serves as the head of the whole object phrase of out of.