The very first thing I would check would be system temps. You can check your temps in the bios OR you can use something like speedfan.
Next you can test your ram with
memtest This runs from bootable media; ie CD or floppy.
A very quick and easy way to tell if the problem is hardware or software is to run in safe mode. If it locks up in safe mode, it is almost always a hardware issue; ie ram, failing motherboard, pw supply, etc, etc.
Another thing you can do is open the case and give the motherboard a VERY close inspection with a bright light. Look for any leaking, discolored, or bulging capacitors on the motherboard. If you have found any,you have found your problem.
Post back with the results of the test/inspection, system temps.