The first thing you should do to fix this problem is to reboot your computer into "safe mode". This is done by restarting your PC and pressing F8 continuously to load up an options screen. On this screen, select the "Safe Mode" option which will open Windows without any of the drivers or software that can damage it. Doing this will allow your computer to load up without any of the software that could be causing it to freeze... meaning that if it does not crash in safe mode, then the software of your PC is to blame. If your system does crash in safe mode, then it's likely going to be a hardware issue which should be looked at by a computer technician.
If you run your PC in safe mode and it does not crash, then you've likely got a problem with the software on your computer. This is actually quite easy to solve thanks to the nature of this problem. Most of the time, Windows systems freeze or crash because they cannot process the files & settings that they need inside the registry. The registry is the database which stores all the settings and information for your computer, and is where Windows keeps everything from your latest emails to your desktop icons.
The registry is a highly important part of Windows, but it's also one of the main causes of your system crashing. The problem is that since Windows needs to read 100's of settings from the registry each time you use your system, any damaged or corrupted settings that are inside your PC will actually make Windows run slower as it has to take longer to read these files. However, if the settings become so corrupted that Windows cannot read them at all, it has no choice but to freeze and crash. This is a very common problem and is very simple to fix.
To fix a computer that crashes because of software issues, you should first download a registry repair tool. This is a software tool which scans through your system and fixes the files that could be causing it to crash. These tools are very efficient and if you can get one which works well to fix the largest number of problems on your system, it will make your PC a lot more reliable and should stop all the freezes.