Refraction
Refraction is the change in direction of a wave due to a change in its speed. This is most commonly seen when a wave passes from one medium to another. Refraction of light is the most commonly seen example, but any type of wave can refract when it interacts with a medium, for example when sound waves pass from one medium into another or when water waves move into water of a different depth. Refraction is described by Snell's law, which states that the angle of incidence is related to the angle of refraction by
-r
where v_1 and v_2 are the wave velocities through the respective media.

# Explanation
In optics, refraction occurs when light waves travel from a medium with a given refractive index to a medium with another. At the boundary between the media, the wave's phase velocity is altered, it changes direction, and its wavelength increases or decreases but its frequency remains constant. For example, a light ray will refract as it enters and leaves glass; understanding of this concept led to the invention of lenses and the refracting telescope.
Refraction can be seen when looking into a bowl of water. Air has a refractive index of about 1.0003, and water has a refractive index of about 1.33. If a person looks at a straight object, such as a pencil or straw, which is placed at a slant, partially in the water, the object appears to bend at the water's surface. This is due to the bending of light rays as they move from the water to the air. Once the rays reach the eye, the eye traces them back as straight lines (lines of sight). The lines of sight (shown as dashed lines) intersect at a higher position than where the actual rays originated. This causes the pencil to appear higher and the water to appear shallower than it really is. The depth that the water appears to be when viewed from above is known as the apparent depth. This is an important consideration for spearfishing from the surface because it will make the target fish appear to be in a different place, and the fisher must aim lower to catch the fish.
The diagram on the right shows an example of refraction in water waves. Ripples travel from the left and pass over a shallower region inclined at an angle to the wavefront. The waves travel more slowly in the shallower water, so the wavelength decreases and the wave bends at the boundary. The dotted line represents the normal to the boundary. The dashed line represents the original direction of the waves. The phenomenon explains why waves on a shoreline never hit the shoreline at an angle. Whichever direction the waves travel in deep water, they always refract towards the normal as they enter the shallower water near the beach.
Refraction is also responsible for rainbows and for the splitting of white light into a rainbow-spectrum as it passes through a glass prism. Glass has a higher refractive index than air and the different frequencies of light travel at different speeds (dispersion), causing them to be refracted at different angles, so that you can see them. The different frequencies correspond to different colors observed.
While refraction allows for beautiful phenomena such as rainbows it may also produce peculiar optical phenomena, such as mirages and Fata Morgana. These are caused by the change of the refractive index of air with temperature.
Snell's law is used to calculate the degree to which light is refracted when traveling from one medium to another.
Recently some metamaterials have been created which have a negative refractive index.
With metamaterials, we can also obtain the total refraction phenomena when the wave impedances of the two media are matched. There is no reflected wave.
Also, since refraction can make objects appear closer than they are, it is responsible for allowing water to magnify objects. First, as light is entering a drop of water, it slows down. If the water's surface is not flat, then the light will be bent into a new path. This round shape will bend the light outwards and as it spreads out, the image you see gets larger.
A useful analogy in explaining the refraction of light would be to imagine a marching band as they march from pavement (a fast medium) into mud (a slower medium) The marchers on the side that runs into the mud first will slow down first. This causes the whole band to pivot slightly toward the normal (make a smaller angle from the normal).

# Ophthalmology
In medicine, particularly ophthalmology and optometry, refraction (also known as refractometry) is a clinical test in which a phoropter is used to determine the eye's refractive error and the best corrective lenses to be prescribed. A series of test lenses in graded optical powers or focal lengths are presented to determine which provide the sharpest, clearest vision.

# Acoustics
In underwater acoustics, refraction is the bending or curving of a sound ray that results when the ray passes through a sound speed gradient from a region of one sound speed to a region of a different speed. The amount of ray bending is dependent upon the amount of difference between sound speeds, that is, the variation in temperature, salinity, and pressure of the water.
Similar acoustics effects are also found in the Earth's atmosphere.  The phenomenon of refraction of sound in the atmosphere has been known for centuries; however, beginning in the early 1970s, widespread analysis of this effect came into vogue through the designing of urban highways and noise barriers to address the meteorological effects of bending of sound rays in the lower atmosphere.