Light travels through different mediums and its path changes when moving between mediums of different densities. When light travels from air into glass, it passes through two mediums - air and glass. At the interface between the two mediums, the light's path is refracted or bent due to a change in speed. This bending of light when passing between different materials is called refraction.