How to Unfreeze a Macby Micah McDunnigan
If your cursor is replaced by a spinning rainbow beach ball that won't go away, it may be a sign that your Mac has frozen up. If the problem doesn't fix itself within a few seconds, chances are you'll need to fix it yourself. The solution could be as easy as using Force Quit to terminate a frozen program, but you might have to go as far as forcing your Mac to power down.
If your Mac's problem is a frozen application, you can try using Force Quit to make the application close. Press "Command-Option-Esc" to launch Force Quit, select the application that isn't responding and click the "Force Quit" button to try to make the program close. Try pressing and holding "Command-Option-Shift-Esc" for a few seconds if nothing happens. This command attempts to force the application you were last using before your computer froze to quit. You will lose any unsaved changes to your current work, but you will get control of your computer back.
If your Mac doesn't respond to the different Force Quit commands then the problem isn't that a single application has frozen. The problem is that your entire system is frozen. You can tell your entire system to restart by pressing and holding "Command-Control-Eject" for a few seconds.
The Power Button
If your computer still isn't responsive, you will have to force your Mac to turn off. Press and hold the power button until your computer cuts off the power to forcibly shut itself down. Both the commands to forcibly restart your computer and holding down the power button can damage your file system, so you should not use them unless your computer is completely frozen and you have no choice.
Your computer should rarely, if ever, freeze. If your Mac is freezing on a regular basis then there is a systemic problem you need to address. Make sure that you've been installing the system updates Apple releases, as well as the latest updates for all the software on your computer. If your hard drive is almost full, then delete some files to free up some space. If your computer is running sluggishly and freezing, buying more RAM for your Mac could improve its performance and stop the behavior.