An example is when light goes from traveling on air to the water. A famous experiment that is done on many schools to prove this is the one with the pencil on a cup of water. I added both pictures so you are able to visualise what I'm trying to say. The pencil "bends" on the water because of a phenomenon called refraction. When light enters water, it cannot move as fast as it does in air, therefore, as the light enters the water, it bends away from its original path. Hope I was able to help!!