You have just asked the million dollar question!
Prepositions are the cruelest invention known to man and you may have noticed that 9/10's of my questions relate to prepositional usage ... and I'm a native English speaker! (I have been living away from North America since 1985 and I can feel my grip on English prepositions slowly loosening).
My advice to you is to use the dictionary for the physical concrete definitions of prepositions:
"The man is in the car",
"Your dinner is on the stove", etc. Idioms and fixed expressions using prepositions (
"The airplane arrived on time and I got to the airport in time to see it land",
"You're in for a treat") simply have to be learned by heart.
Or if in doubt about a particular expression, ask the good folks at UsingEnglish.com!
Good luck with your studies.
Bill