When light meets an object, it may pass directly through the object with no effect, be absorbed by the object, or be reflected off the object. When light passes through certain objects, however, it may change direction in the process. The name for this light-bending phenomenon is refraction.
Refraction occurs when light leaves one transparent substance, such as air, and enters another one of a different density. The density of a substance affects the speed at which light travels through it. A change in the speed of light causes the light to bend, or refract. Because air, water, glass, and diamonds, for example, possess different densities, light refracts when it passes from one of these substances to another. When light leaves a substance, it resumes the speed it was traveling before it entered the new medium.
Light also travels differently through different temperature regions -- even within the same medium. When passing from cold to hot water, light will refract just as surely as light passing from glass into air, because the change in temperature changes the density of the water and therefore the speed of the light passing through it.
Refraction can be deceiving, distorting one's line of sight. When light coming from a distant mountain, for instance, changes direction before it gets to your eyes, the mountain may appear to be above the horizon, floating in the sky. Such mirages -- in the desert or elsewhere -- are caused by light passing from hotter into relatively cooler air and refracting in the process.
The change in direction of light as it passes from one material to another is the foundation of all optical devices. By understanding refraction, scientists have developed lenses that reduce, magnify, focus, and disperse optical images. Eyeglasses, microscopes, and cameras all depend on bending light as it passes from air into glass and back into air.