There are dozens of reasons why computers suddenly freeze. If this starts happening regularly, though, it's probably caused by a new item of hardware or software. Think back - have you installed anything new? If
so, restart the computer and uninstall the item or program in question to see if this fixes the problem. But don't forget the possibility of a simple solution - if you use a wireless mouse, check its batteries.