If the computer crashes after a few minutes, and then it crashes immediately after it is turned on again, then it is safe to assume that the CPU is overheating.
Open the case, remove the CPU heatsink/fan, clean the computer with a blower, remove any dust clogged inside the fans/heatsink, and...