How does block-ui work ?

How does block-ui work ?

I am using blockui JQuery plugin. It is not doing what I need it to do. I have some events and html elements disabled or not working when they should. 
I want to write my on blockui, but I am not sure how the block ui is stopping the UI thread. 

I want to know what is the technique used by block ui to stop all inputs. Can anybody help ?