The JS and CSS files are loaded in their entirety. There is no "magic".
Normally, though, they are loaded only once, when the user first enters your site. Subsequent page loads are done using AJAX, and the <head> content ignored, so no re-loading of the files for each page. (If you use data-rel="external" or data-ajax="false" on links, though, it is all re-loaded, which is why I don't recommend this "universal fix" which is no fix.)
If you use minified files and have your server gzip them, they are much smaller.
There is an experimental "builder" for jQuery Mobile that will build a version of JQM with only selected features.