Use "Force Quit" to Unfreeze your iMac
If your Apple iMac has frozen up while you are using a specific piece of software, the issue probably lies with the software. It may have made an incorrect demand upon the OS X operating system, consuming all its resources, or the software might be installed incorrectly. This type of freezing error will usually be signified by a "Spinning Beachball" icon replacing the mouse cursor. The "Force Quit" dialog box allows a Mac user to halt a program even if the interface is unresponsive.
To call up the "Force Quit" dialog, either select it from the Apple menu at the top left of your iMac's Menu Bar, or if you have no mouse input hold the "Cmd", "Option (Alt)" and "Esc" keys. When the "Force Quit" dialog box appears, select the software program you were using and choose "Force Quit". Very occasionally, you may have to do this more than once to get the unresponsive program to stop.
After your iMac has unfrozen, open the offending program again, and see if the error occurs again. If it does, the software installation itself may need repairing. To do this, open "Disk Utility" and select your hard drive (usually labelled "Macintosh HD"), then press "Repair Disk Permissions". The program will then search for and attempt to repair any incorrect software permissions.
If this does not stop the freezing problem on your iMac when using a particular piece of software, you may need to completely reinstall the offending software.