A preposition is a word that shows how a word (noun or pronoun) is related to another word in the sentence. The prepositions tell four things in a sentence:
1) Location: Where something is.
2) Direction: Where something is going.
3)Time: When something happens.
4) Relationship: between noun/pronoun and another word in the sentence.
Some commonly used prepositions are: of, in, into, on, etc.
The dog was sitting beside the lamp.
Here, 'beside' is the preposition.