When no other input works one has to resort to the off button, or sometimes a reset button.
The cause of a freeze is usually that the programmer has incorrect termination conditions for a loop. But unstable electricity is an underestimated cause for freezings. More freezings than most people realize is due to interferences in the electricity.
Usually, in systems with a modern operating system, the user is able to terminate the program's running (for instance, with the "kill" Unix command, or through the "end task" button on the task list in recent versions of Microsoft Windows), and, if they wish, restart it in the hope that the anomalous condition that caused the freeze does not recur. Older systems, such as those using MS-DOS, often needed to be totally restarted in the event of a freeze.
Most newer systems, such as Apple Computer's Mac OS X and Microsoft's Windows XP crash less often; they do not need to be totally restarted in the event of a freeze.