For laptops, make sure that the machine is on a hard, flat surface that won't "smother" the chassis around its vents, thus restricting airflow.
You can monitor the temperature of your CPU with my favorite free monitoring tool, PC Wizard. In addition to other helpful uses, it will show you the real-time temperature of all your system components.
If everything looks good with your airflow but the temperatures continue to rise, check your BIOS settings. If you've messed around with voltage settings during some kind of overclocking escapade, reset the values to their defaults. The more voltage a component receives, the hotter it becomes.
If you have recently installed a new CPU, the crashing could stem from a poor application of thermal paste. So remove your heatsink, clean your surfaces with a cotton ball and a little rubbing alcohol, and try again.
There are competing theories on how to apply thermal paste, but your goal is always the same. The thermal compound fills the microscopic valleys on the surfaces of the CPU and heatsink to provide the most even and full contact between the two components. The paste is ineffective when too littleor too muchis applied. So I use the pea-drop method: I place a small, pea-sized drop in the middle of the CPU, and then place the heatsink directly on top, letting the natural pressure of the heatsink to spread the paste evenly.
Not enough power
It's always fun to cram more powerful components inside your PC, and of course overclocking your CPU will yield performance dividends. But you can only upgrade so far before you begin running low on juice. Your PC will become unstable and unexpectedly restart if you put too much strain on your power supply.
There's no easy way to determine which components are drawing the most power, but your component manufacturers' websites might list power consumption specs online. From there, you can calculate your approximate total power consumption, and compare it to the output of your power supply.
If you determine your PSU can't handle the load of all your components, you have to make some difficult decisions. If you overclocked your CPU, you can return the processor to its original state. Otherwise, you can replace your power-hungry components for less needy ones, or follow the most sensible path and simply upgrade your power supply. A 500- to 650-watt power supply should be able to properly power an average performance PC.