How does the Doppler effect work?
The Doppler effect is a change in observed frequency caused by relative motion between a wave source and an observer. An approaching ambulance sounds higher pitched and a departing one lower pitched. The source itself need not change its emitted frequency.
Spacing between wavefronts
A sound source moving through air compresses wavefront spacing ahead and expands it behind. Observer motion also changes the rate at which wavefronts are encountered. For sound, medium motion and sound speed in that medium matter. Light requires special relativity rather than direct use of acoustic formulas. Cosmological redshift likewise cannot always be reduced to ordinary motion through space.
Measurement and interpretation
Radar, stellar spectroscopy, and ultrasonic flow measurements use Doppler shifts. Measurements are often sensitive to the line-of-sight velocity component, not the entire transverse motion. Estimating speed requires knowledge of the original frequency, geometry, and wave type. Frequency shift must also be distinguished from loudness: frequency controls pitch, whereas amplitude helps determine intensity.