Refraction is the phenomenon that occurs when light bends as it passes through different mediums, in this case, various densities of air. Changes in air density can occur because of temperature gradients or differences in humidity, leading to variations in the speed of light as it travels through the atmosphere. As light moves from one medium to another, such as from warm air to cooler air, it slows down or speeds up, resulting in a change of direction. This bending of light is responsible for various atmospheric effects, such as the appearance of a sunset or the distortion of objects seen through layers of heated air above a surface.
Reflection involves the bouncing of light off surfaces without changing its medium, diffraction relates to the spreading of light waves as they encounter an obstacle, and scattering refers to the redirection of light in multiple directions upon interacting with particles or molecules. These processes are distinct from refraction as they do not involve the bending of light due to changes in density.