A Mach number (M) refers to the ratio of the speed of an object to the speed of sound in a particular fluid medium: where is the speed of the source relative to the medium and is the speed of sound in the medium.
Subsonic Speeds,
In this case, let's say the source of the sound is an emergency vehicle, such as an ambulance.
When the vehicle is stationary, all observers will hear the siren at the same pitch. The sound waves are being emitted at a constant frequency () and the wavefronts are propagating away from the source at the constant speed of sound (c), which means that the waves will reach all observers with the same frequency (equal to the actual frequency at which they are being emitted).
When the vehicle is moving, observers in front of it will hear the siren at a higher pitch because the sound waves are bunching together in front of the vehicle and thus reach these observers at a higher frequency. Meanwhile, observers behind the vehicle will hear the siren at a lower pitch because the sound waves are spreading out behind the vehicle and thus reach these observers at a lower frequency.
Breaking the Sound Barrier,
In this case, let's say the source of the sound is a jet.
If the jet was to fly exactly at the speed of sound (which is approximately 343.2 m/s in dry air at 20°C), the wavefronts ahead of the jet would all bunch together at a single point, which means that observers in front it will hear nothing until the jet arrives and passes overhead.
Supersonic Speeds,
In this case, the source of the sound is also a jet.
If the jet was to fly faster than the speed of sound, it would actually lead the advancing wavefronts and pass by the observer before they hear the sound it creates. Behind the jet, the sound waves would create a cone-like formation known as a Mach cone, and the intense air pressure which builds up on the leading edges of this cone would cause a shock wave known as a sonic boom just after the jet passes.