The Doppler Effect is the observed phenomenon whereby an object that makes a sound will have a higher pitch for an observer while coming toward to that observer, and a lower pitch while moving away.
It happens because sound travels by compression waves and human perception of pitch is determined by the frequency with which those compression waves hit the eardrum. As the sound-making object is moving toward the observer, each subsequent cycle of that wave generation will happen slightly closer to that observer, and thus arrive sooner than if the object stayed still. Because the cycles are arriving faster, they hit with a higher frequency are thus perceived as having a higher pitch.
The reverse happens when the object is moving away from the observer.