“A compressor stall is a situation of abnormal airflow resulting from a stall of the aerofoils within the compressor. Stall is found in dynamic compressors, particularly axial compressors, as used in jet engines and turbochargers for reciprocating engines. Compressor stalls result in a loss of compressor performance, which can vary in severity from a momentary engine power drop (occurring so quickly it is barely registered on engine instruments) to a complete loss of compression (compressor surge) necessitating a reduction in the fuel flow to the engine” (Wiki).
A particular kind of stall is the so-called compressor surge is a complete breakdown in compression that occurs when compressor’s blades stall (airfoils) just like an airplane wing stalls, because the flow is disrupted or the angle of attack gets too high, forward flow through the compressor can no longer be maintained, air piles up in the rear stages of the compressor without being compressed and a momentary reversal of flow causes a violent expulsion of previously compressed air out (sometimes) through the intakes too. The excess air can cause a loud bang a flames (because of the high temperatures).
The compressor will usually recover to normal flow once the engine pressure ratio reduces to a level at which the compressor is capable of sustaining stable airflow. Some engines have automatic recover functions even if pilots experiencing the surge can be compelled to act on the throttle or, in some cases, relight the engine.
Needless to say, compressor stalls could be very dangerous especially when occurring in critical phases of the flight: departure, initial climb, landing. Look at the following image I created basing on a sequence of pictures I took “somewhere” in the Indian Ocean aboard USS Nimitz (CVN-68) on Oct. 19, 2009. It shows an F-18C (BuNo 165205 Modex 405) belonging to the VFA-86 “Sidewinders” experiencing a compressor stall during the catapult launch from CAT number 4. The aircraft is fully loaded with fuel and it is carrying weapons too, since it is taking off to support Operation Enduring Freedom in Afghanistan. Fortunately, the aircraft was able to depart in spite of the loud bang and flames coming out from the port engine exhaust that in the second image seems to be operating without the afterburner.