4 Answers
4

Short Answer

MacOSX uses Hybrid Sleep. When closing the lid, the desktop state is written to both RAM and disk.

Then, while the computer still has enough power for the RAM, it wakes from RAM (sleep). However, in case the power gets cut, the computer wakes from the disk (safe sleep).

Keep in mind, that the battery isn't actually at it's lowest charge when switching to safe sleep. It still keeps some charge left. Therefore, if you want to fully drain your battery, the computer must stay in safe sleep for several hours until the white led stops 'breathing'.

As Mike pointed out in his answer, it is good to know that the memory is written to disk immediately when sleeping, and not just when the battery gets critically low. The difference however will be that as long as the RAM stayed powered, it will resume from RAM, but if there was a power cut, it will resume from the available memory dump on disk.
–
GerryJan 3 '12 at 15:15

By default, it does both sleep and hibernate -- that is to say, it powers down what it can but keeps the RAM powered so that it can resume immediately, but it also dumps the current state of the RAM to disk so that it can resume from disk if it runs out of power.

Basically, closing your Mac is what you want to do when "turning it off" in any situation. It goes to sleep (using very little power, just keeping your RAM active) and this allows it to turn back on again within only a second or so.

Additionally, whilst in this state, it makes a copy of the RAM on your hard drive in case its battery goes flat whilst it's sleeping. In this case, it will take quite a bit longer to turn back on, but this will happen only very rarely.

Bottom line is, if you close the lid, it'll remember everything of what you were doing, it'll lock your Mac and in almost all cases, it'll turn back on incredibly fast.

Also worth noting that Macs don't really get "overloaded" like Windows does. You can keep a Mac running (as in, no proper reboots) for good month or so without it "clogging up" and getting slow. Usually, the only reason you'd want to reboot is after an update or something similar.