The bending of light as it passes through a medium with a different refractive index, such as air to water or glass.