What is Doppler Effect?

The Doppler effect is when sound waves are either compressed or elongated by an object moving toward or away from us. The waves get compressed on approach just as a train whistle seems to be a higher pitch as it comes toward you.