Could be one of the internal fans has failed, both the CPU and the graphics cards use fans for cooling.
A common symptom is the PC start to freeze/crash after a certain amount of time being on. You may wish to take the cover off and see if you can see the fans moving but you need to be very carful not to touch anything while one, as it will be live.
If one of the fans have stopped, it maybe stuck shut down the PC and using a folded piece of paper, try spinning the fan manually and blowing some of the dust off.
Boot up again and see if that has resolved the problem. If it hasn't then the fan will need replacing.