Light bends when it passes from one medium to another of different density due to a change in speed. When light travels from a less dense medium to a denser one, it bends toward the normal line; when traveling from a denser to a less dense medium, it bends away from the normal line. This bending, or refraction, is caused by the change in speed of light and is determined by the angle of incidence and angle of refraction between the media.