Final answer:
When light passes through a medium of different density, it changes speed, causing it to change direction in a process called refraction.
Step-by-step explanation:
When light passes through a medium of different density, it changes speed. This change in speed causes the light to change direction, a phenomenon known as refraction. The degree to which the light ray changes direction depends on the difference in densities between the two media. If the second medium is optically denser, the light ray will bend towards the normal line, whereas if the second medium is optically rarer, the light ray will bend away from the normal line.