Stalling and surging in a compressor

I am confused as to how does stalling and surging occur in compressors. Apparently surging is the lower limit of operation for the compressor but I don't understand how.