Randomly
The biggest problem is trying to figure out why your computer freezes if you can not spot a pattern. We’ll look at some possible issues and give you some trouble shooting help so you can hopefully spot a pattern in your computer freezing errors.
If you find that your system shuts down after its been in use for several hours it might be heat related. Your computer fan might not be working properly so after sometime your system/mother board will overheat. Besides the problem of having your computer freeze this could also cause damage to your motherboard or other internal parts of your computer (video cards, RAM). Make sure your fan is working correctly and that the vent is not blocked (double check if you have pets because animal hair loves to collect in the vent area).
Also your computer RAM might be faulty, this often is high lighted by random compute freezing because you can not pinpoint certain software conflicts or establish a set pattern. The RAM might be faulty or it might not be installed correctly.
Computer hard drives can also stop working at random times. Do not assume that just because your computer started up that your drive will continually keep working properly. Most hard drive stop working perfectly for several weeks before they fail completely.
With software you can run different types of programs to try and pinpoint some potential problems. Run some sort of overall system checker and also check your computer registry files. You can also run a hard drive defragment program and you should run a virus detection program.