The most likely cause for this is that you have a heat related issue.
This could be overheating of the CPU or a Video Card due to clogged up cooling fans, or a poorly fitted cooling fan or heat-sink.
In most cases, the heat-sink gets clogged with dust, hair, fur and the like.
Resolving something like this is relatively simple, and can be achieved with the use of a brush and/or compressed air in a can. Removing the dust and dirt allows the air to flow freely and stops the CPU from overheating.
As mentioned, a poorly fitted Heat-sink can also cause overheating.
There is a thermal pad or heat-sink compound between the heat-sink and CPU.
If this is compromised or dried out, then overheating can occur.
If this is the case, then the old thermal paste should be removed, and fresh thermal paste applied.