Refraction happens when there is a bending of path of a light wave as it passes across the boundary separating two media and the degree of bending is determined in part by the total change in velocity as the light passes from one medium to the other. In addition, the change in speed experienced by a wave when it changes medium can result in a number of beautiful optical effects.