As an object moves through the air it creates a series of pressure waves in front and behind it, similar to the bow and stern waves created by a boat. These waves travel at the speed of sound, and as the speed of the aircraft increases the waves are forced together or 'compressed' because they cannot "get out of the way" of each other, eventually merging into a single shock wave at the speed of sound. This critical speed is known as Mach 1 and is approximately 1,225 km/h (761 mph) at sea level.
In smooth flight, the shock wave starts at the nose of the aircraft and ends at the tail. There is a sudden rise in pressure at the nose, decreasing steadily to a negative pressure at the tail, where it suddenly returns to normal. This "overpressure profile" is known as the N-wave due to its shape. We experience the "boom" when there is a sudden rise in pressure, so the N-wave causes two booms, one when the initial pressure rise from the nose hits, and another when the tail passes and the pressure suddenly returns to normal. This leads to a distinctive "double boom" from supersonic aircraft. When maneuvering the pressure distribution changes into different forms, with a characteristic U-wave shape. Since the boom is being generated continually as long as the aircraft is supersonic, it traces out a path on the ground following the aircraft's flight path, known as the boom carpet.