"On" is when something is touching a surface. This can be above something and touching or connected to something. For example you can hang a picture "on" a wall. My feet are on the floor.
"In" is inside or towards the inside of a container, place or area, or surrounded or closed off by something. For example you can put the food in the oven to cook. The eg