Try taralone's recommendations; they should fix it.
If they don't, we'll need the stop code as taralone mentioned.
Also, have installed anything new recently? Any new software, hardware, devices?
What version of Windows are you using?
Is there any particular program you open that causes it to crash?
To test for that, reboot your computer, open ONE program and leave it for 10 minutes. If it doesn't crash, reboot, open the same program, and another program with it, and same again, until you find the program that's causing it to crash.
When you find the program, remove it, and reinstall it.
You could also test for hardware that's causing it to crash by doing a Hardware clean boot.
From my own personal experience with Microsoft Tech Support:
--------------------------
This is nothing but disabling all the devices and trying to boot into the desktop. Here is how we do this:
1.Click on Start and then Run .Type ‘devmgmt.msc’ and click Ok.
2.Once 'Device Manager' is opened,right-click on the devices below and click 'Disable'.
Display Adapters
Network Adapters
MODEM
CD/DVD drives
COM&LPT Ports
Sound cards
Universal Serial Bus Controllers(Do not disable USB mouse and keyboard)
3. Restart the computer
------------------------------------
Once restarted, go about doing whatever you normally do. If it still crashes, then go back into devmgmt.msc and re-enable everything.
If it doesn't crash, you have found there's a problem with a hardware device. So, to isolate which device it is, re-enable one, reboot the computer, and carry on like normal. If it doesn't crash, re-enable another, and keep doing so until you find your problem device. When you find it, uninstall the drivers for it, and re-install them.
I'm reluctant to say that it's an overheating issue, but it is quite possible. If you know your way around the inside of a computer, check that the CPU fan is fully connected and functional. When you boot up, press the Delete key to get into the system BIOS. This should allow you to see what temperature the processor is currently running at, and the speed of the CPU fan. If either of them are worrying, then I would suggest returning it to whoever you bought it from, and if you have a service package (such as that with Dell machines) get it repaired.
You can also check the temperature of the processor whilst in Windows with a program such as CoreTemp. Fan speed can also be checked with another program called SpeedFan.
Hope that helps,
-Adzie