My teacher taught me and easy way to learn how to use those prepositions. Imagine you haave a box full of paper under the tabble. The pieces of paper are 'IN' the box (inside the box). The box is 'ON' the tabble (under the tabble). And you bought the box 'AT' a Supermaket (exact place). So, you should use 'IN' when it means INSIDE something, 'ON' when it means UNDER something and 'AT' when you want to mention the EXACT PLACE. I guess that's it.