How is jQuery checking if the document is loaded? How it is checking that the document load is finished?
jQuery doesn't do anything that JavaScript cannot/does not do - it's simply a JavaScript framework/library. What it does is provide wrappers around JavaScript events that browsers implement, such as onload ($.load()) and DOMContentLoaded ($.ready()). Of course, there is a lot of work under the hood that attempts to make this behaviour as standard as possible across browsers and works around browser bugs, issues and incompatibilities.
For example, IE didn't really support DOMContentLoaded before IE 9 but jQuery has to provide an implementation for it. You might want to see these links to understand more about what this event is and how one might implement something similar, even without jQuery:
If you really want to see what's being done by jQuery, you should check out the jQuery source.