The word is a preposition when it is used with an object. For example: We drove to the beach.
However, the word “to” is not always a preposition. Sometimes, the word “to” is used with a verb. In that case, it is part of an infinitive.
Here are some examples: to run, to talk, to stop. to go, to jump, to laugh.
What is an infinitive? An infinitive is simply the word “to” followed by a verb form. Here are some examples:
He liked to eat.
The children loved to play basketball.
We are going to buy some apples.
He loved to paint houses.
The teacher is going to teach physics.