How can the change in frequency of a wave reveal the motion of its source?
When a source of waves and an observer are in relative motion, the observer detects a frequency that differs from the emitted frequency. An approaching ambulance sounds higher than it is; as it passes and recedes, the pitch drops. This is the Doppler effect, and it applies to all waves — sound, light, and every part of the electromagnetic spectrum.
For light, the Doppler effect reveals the universe: the red shift of distant galaxies told Hubble that the universe is expanding. The same principle lets astronomers measure stellar rotation, find exoplanets (by the wobble in stellar spectra), and study binary star systems. In medicine, Doppler ultrasound images blood flow; in weather radar, it tracks storm motion; in speed cameras, it measures vehicle velocity.