Refraction is the bending of a wave when it enters a medium where its speed is different, such as light passing from air to water. This phenomenon is responsible for many optical effects, including the apparent bending of objects submerged in water and the formation of rainbows.