Kendra asked me once how sonic booms work. I had to admit that I didn't know. But I have an insatiable thirst for knowledge, so I decided to find out! Here's an email I sent to her:
I've done some research and it seems that in order to understand sonic booms, one must first understand shockwaves. Shockwaves are aptly named because they come at you by surprise. If you had a medium, say air or water, and something in it were traveling toward you like a bee or a shark, you would be able to tell because of the motion of the waves as well as the sounds that these produce. This gives you and the particles of water or air that sit next to you a little warning to get out of the way.
Not to say that molecules are sentient...more like it starts jostling them gradually and they build up energy to move out of the way.
But imagine if the bee flew fast. As fast or faster than those waves it's producing. The molecules wouldn't see it coming! It would be quite a shock for them when they have to suddenly get out of the way with no warning. You've seen waves...they go up and down, up and down, nice and smooth-like. But shockwaves are like a sudden step up in pressure, density, or velocity, etc. with no graduality.
What do you and your molecule friends do now? You've just hit a wall. You scream. You make noise.You start panicking. This causes a panic among all the other particles that have already hit the wall. Pretty much all the molecules that have already smacked up against it run around frantically.
Okay, so there is no wall and molecules can't scream and even if they could you wouldn't hear them. The stepped-up wave that the bee is causing just gave them a whole bunch of energy. They can spend that energy however they want, and a cheap way to get rid of it is to pass it along behind them to cause audible sound waves.
As long as the bee is traveling as fast or faster than those waves it's producing in the air it is producing a shockwave. You generally only hear one boom from a jet (or two booms; one from the nose, one from the tail) because it passed you. But if you could somehow keep up with it (just below and behind it) you might just hear it continuously...'course, you'd be making a shockwave of your own if that were the case and things might get complicated.
Shockwaves can come from many things: supersonic jets, detonations, Japanese bullet trains in tunnels, and even whips. The proper crack of a good whip is a miniature sonic boom; the tail of the whip actually travels faster than the local speed of sound.