A preposition is a word, or a group of words, that usually comes before a noun or pronoun and shows place, position, time, or method, like a bridge linking that word to the rest of the sentence.
In The keys are on the table, on is the preposition and table is its object.
In She sat beside me at lunch, the preposition beside links to its object me, and at links to its object lunch.
In We walked across the bridge, the preposition is across and its object is bridge, the noun it points to.
A nearby mix-up
People sometimes point at the wrong word here. The preposition is the little linking word itself, like on or beside. The object is the noun or pronoun that the preposition links to, typically the word right after it. It answers the question on what? or beside whom?.
In He put the letter under the door, under is the preposition and door is the object. The object is usually a noun or pronoun right after the preposition, though sentences like Come in show the word can also stand alone. When you spot the small linking word and the noun following it, you have found both parts of the pair.