ON:
For a point on a surface:
On the table
On the floor
For a position along a river, coast, lake...:
On the west coast of the province
On the left bank of the river
For a floor in a building:
On the third floor
For a public transport:
On the bus
On the train
IN:
For enclosed spaces:
In the house
In the garden
In a box
For workplaces seen as a location:
In the office
In a hospital
For countries and cities:
In Barcelona
In Japan
For class:
In class
AT:
At a particular point:
At the end of the road
At the entrance
At the desk
For activities and companies or businesses:
At Mary´s party
At Macy´s
At the hairdresser´s
For home/school/college/university:
At home
At school
For addresses:
At 853 Shefield Road
At 12 Greenland Avenue