I'm a new Mac user. What happens when I close the lid on my MacBook Pro running OS X Lion?
Is it sleeping? Or hibernating? Something else?
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'.
Here is an excerpt of the official Apple Documentation:
On all Macs:
On portable Macs:
The Ethernet port turns off, if applicable
Expansion card slots turn off
The built-in modem, if present, turns off
An AirPort card, if present, turns off
The USB connection only responds to the power key on an external keyboard
The optical media drive spins down
Audio input and output turns off
Keyboard illumination, if a feature of your portable computer, turns off
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.
You don't do any harm to close the lid. In fact I never shut down my Mac, I always close the lid. It's fast, it's secure, just like Mike just told you.