To help understand how a sonic boom is created we must first understand the nature of a sound wave created in air by a stationary object and what happens when waves interfere with each other.
Sound is created when a vibrating object disturbs a medium, causing the molecules in the medium to alternately compress and rarefact (separate) in rhythm with the object's vibrations. In the case of sound we normally hear, the medium is air (although it does not have to be which is why we can hear sounds underwater). If the object is allowed to vibrate freely in open air on a calm day, the compressed and rarefacted molecules of air will transfer the vibrations to molecules close to them. Those molecules will transfer the vibration to molecules next to them, etc... The result is a "wave" of compressed air moving away from the source of the vibration in all three directions simultaneously. These waves of sound have a speed called the "speed of sound" which is determined by the atmospheric conditions in the area where the sound is created.
The intensity, or "loudness", of the sound gets less the further away the compression moves from the source. In fact it obeys the "inverse square law" which means that for each time it doubles the distance from the source, the sound becomes 1/4 as intense.
When two waves overlap, they interfere with each other. For the purposes of a sonic boom we need only concern ourselves with constructive interference. In constructive interference the pressure and rarefaction of the the two waves overlap. When this happens the pressures add together making an even stronger wave. If three waves overlap and constructively interfere there is an even stronger pressure wave created producing a more intense (louder) sound. The more waves that constructively interfere with each other, the more intense the resulting pressure becomes.
In the case of a plane creating a sonic boom, the plane moving through the air makes a pressure wave by pushing air out of its way as it moves forward. It is not vibrating as in the simple example above, but it is making pressure in the air which we can hear as sound. The sound leave the plane in all directions, but is most intense in front of the plane. As the plane approaches the speed of sound, the new wave it creates overlaps the wave it created earlier causing constructive interference. When the plane reaches the speed of sound, all of the sound it is creating and pushing out in front of the plane is overlapping all of the sound it has just created producing a lot of constructive interference. The result is one huge wave of pressure that builds up in front of the plane. Even though the plane may be far away, and the sound has to obey the inverse square law, there is so much pressure created by the plane moving at the speed of sound that the intensity of the sound is still very high when it reaches the ground. When that pressure reaches our ears we hear it as a loud explosion of sound. It is that loud "boom" of a single, large wave of pressure hitting out ears that we call a sonic boom.