A preposition is a small linking word that shows how one part of a sentence relates to another, usually for time, place, or direction.
In The keys are on the table, the word on connects keys with table and tells you exactly where they are.
Some are short phrases instead of one word: She stood next to the door means the same idea with next to doing the linking.
Picture a meeting. The meeting starts at ten. Here at pins an exact time to an exact hour, so everyone arrives with the same expectation.
Now picture giving directions. Turn left at the bank, then walk to the bridge. The words at and to link your moves to places, showing where each action happens or ends.
A nearby mix-up: the last word in some sentences looks like a preposition but is really part of the verb. In Turn it off, off belongs with turn, so it is a particle, not a linking word. That sentence is fine as it stands.
For a true preposition, ending a sentence is grammatically acceptable. In That is the house I grew up in, the in still links to house. Any objection to this style is social habit, not a grammar rule.