The first thing I would do is leave it powered off for a couple of hours (in case it is an overheating problem). Then I would try booting it into diagnostic mode and running the diagnostics. If this is available it is likely available by pressing F12 (can vary from manufacturer to manufacturer) during boot. Keep an eye on the computer while the diagnostics are running. Pay particular attention to whether or not the fan comes on. If it is noisy then that will tell you something. If it doesn't come on at all then I would suspect overheating and you may need to replace the fan. Another possilbe cause of overheating is a deterioration of the thermal paste between the CPU and the heat sink. It might be useful to know how long it takes the system to fail.