While using a brand new 2011 iMac (21″), I noticed that putting it to sleep (Apple Menu > Sleep) would not work – the screen would turn off, but the computer itself would still remain on.
Here’s the solution – including an application which you can use!