Basically, it writes the entire contents of the RAM to the hard drive, then shuts down. When you boot up again, it notices the file and loads off it.
It's a really neat feature. I use it when I shut down now - booting by "loading off file" is a lot faster than booting by "starting cold", plus I can leave notepad documents open to remind me of things to do.
I forgot that I shut it down this way when I turned my computer off the last time (i.e. when it fried.)
I don't know what sort of hardware it *can* compensate for, but if you swap motherboards when it's hibernated and then boot it back up, it doesn't work. :)