In is used when we talk about position, whereas on is used when we are referring to something that is touching the surface. For example, "The cat is in the box" means the cat is positioned inside the box, whereas "The cat is on the box" means that the cat is standing or sitting on top of the box.