What happens when an aircraft breaks the sound barrier?
The expression &quot;sound barrier&quot; was created maybe 70 years ago when approaching the speed of sound made aircraft react in unanticipated ways. Actually, there is no fixed barrier, and in reality the transition can be rather smooth, provided the aircraft and its pilot are prepared for it.
The speed of sound is the maximum speed with which small pressure changes will propagate through a medium, so at subsonic speed the air ahead of the aircraft can react to the approaching aircraft. Also, while local air density changes only little at subsonic speed, air density changes become dominant at supersonic speed. To make way for an approaching aircraft, subsonic air will speed up while supersonic air will slow down so that density increases to make way for the supersonic aircraft.
At subsonic speed, pressure and speed will change smoothly while air flows around the aircraft. As a consequence, the center of local pressure changes (its lift force) acts at around one quarter of chord, such that the aircraft is balanced when its center of gravity is at the same location.
At supersonic speeds, the air will be taken by surprise - at one moment all was calm and quiet, and suddenly the air molecules get kicked around by an unknown intruder. Pressure changes suddenly, through a shock, so instead of a smooth transition, at supersonic speed there are regions of similar pressure, separated by sudden drops or jumps. As a consequence, the center of pressure changes shifts backwards to 50% of chord. If the center of gravity remains at a quarter chord, the consequence is a strong pitch-down moment: The aircraft will nosedive.
To make matters worse, a control surface deflection, which could redistribute the lift between wing and tail surface, will not necessarily work in the same way as it would at subsonic speed: the aircraft might become uncontrollable. See this answer for a mode detailed explanation.

The cone you see in the right picture is a Mach cone, which would be caused by a supersonic aircraft. The picture was shamelessly copied from this blog.
The trick is now to give the air some advance warning where it counts, even when the aircraft travels at supersonic speed. This can be achieved with wing sweep, because if the sweep angle is larger than the cone angle in which pressure changes will propagate at supersonic flight speed, the air flowing over the wing will be forewarned, thus reacting similarly to subsonic flow. To correct for the inevitable shift in the center of pressure, the tail surfaces are bigger and full-flying in supersonic aircraft, so they work in trans- and supersonic flow. Also, by pumping fuel, the center of gravity can be shifted backwards, so less trim change is needed.
The sound barrier can be broken at any altitude, if the aircraft has a sufficiently powerful engine and is stiff enough. Normally, to save weight, the designers set a limit for maximum dynamic pressure (= air density times air speed squared, divided by two), so the structural deformation at this maximum dynamic pressure is small enough. Note that the deflection of its ailerons will deform the wing of the Eurofighter at maximum dynamic pressure to an extent that three quarters of aileron effectiveness is lost - the ailerons cause a twisting moment which warps the wing such that it works like the wing warping mechanism in the Wright Flyer, only in opposite direction to the aileron input.
Since density drops with increasing altitude, the same dynamic pressure is reached at higher speed, allowing aircraft to fly faster the higher they fly. The next limit is given by the local heat near the stagnation line. If air is decelerated, its temperature will increase with the square of the speed difference. The maximum continuous speed of the F-22 was reduced from Mach 1.8 to Mach 1.6 to avoid overheating the sensitive composite wing structure.