The "Doppler effect" acts on sound. For example, the pitch of an ambulance siren becomes higher
as it moves toward you and lower as it moves away. This phenomenon occurs because many sound waves are squeezed
into a shortening distance as the siren moves towards you, and stretched as the distance grows when the ambulance
moves away from you.
Light and sound are both waves, so the same phenomenon occurs with light, as well.
Since the speed of light is extremely fast, this phenomenon can only be observed in space. Light from stars approaching
the earth has a shorter wavelength, appearing bluer than its true color, while light from stars receding into
the distance has a longer wavelength, appearing reddish. These phenomena are known as blue shift and red shift,
both of which are products of the Doppler effect.