What happens when an aircraft breaks the sound barrier? Why can't it break the sound barrier near the ground?
The expression "sound barrier" 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.
This is a rather broad question, so I'll try to keep it brief. It just so happens that Scientific American covered your question in detail in an article on March 11, 2002. Although I think the Wikipedia Page does a better job of describing it than the SciAm article, but is more a history. Union University gets to the meat of it though. Some of the key things that happen are:
A plane produces sound that radiates out from the plane in all directions. The waves propagating in front of the plane get crowded together by the motion of the plane. As the plane approaches the speed of sound, the sound pressure "waves" pile up on each other compressing the air. The air in front of the plane exerts a force on the plane impeding its motion. As the plane approaches the speed of sound, it approaches this invisible pressure barrier set up by the sound waves just ahead of the plane. The compressed air in front of the plane exerts a much larger than usual force on the plane. There is a noticeable increase in the aerodynamic drag on the plane at this point, hence the notion of breaking through the "sound barrier." When a plane exceeds the speed of sound it is said to be supersonic.
Anything exceeding the speed of sound creates a "sonic boom", not just airplanes. An airplane, a bullet, or the tip of a bullwhip can create this effect; they all produce a crack. This pressure change created by the sonic boom can be quite damaging. In the case of airplanes, shock waves have been known to break windows in buildings.
The most apparent thing that happens is the sonic boom.
A lot of the images you see on the internet of aircraft breaking the sound barrier are really just shockwaves (condensation) that happen before reaching the speed of sound. Shockwave propagation starts happening before actually going supersonic because of boundary layers and the air having to move out of the way of the aircraft (as I understand it). But the pictures look really, really cool!
Here is a nice physics book type of discussion on shockwaves: http://physics.info/shock/
And actually, aircraft are perfectly capable of breaking the sound barrier near the ground. It's just harder as ratchet freak states in his comment, and also there are a lot of rules against it.