I think the most likely cause is overheating probably caused by fluff/dust as mentioned above by Jock1e. Have read of this and follow the instructions. You may not have or need everything mentioned and a small paintbrush and vacuum cleaner may well do the job. The one essential is to ensure the PC is disconnected from the power source.
When you have cleaned it ensure all RAM and cards are seated and all connectors are fully home.
If the dusting doesn't doesn't help, and the psu is not overheating, plus the hard-drive isn't making very strange noises, then perhaps look at http://www.majorgeeks.com for a free diagnostic download, and run a check with a program from that!.
Jock1e suggested starting in safe mode. Try this and see if the machine stays on. It could be a bad driver or malware. If it stays on for longer then shuts down then I would agree with Jock1e that the PSU could be the culprit.
This thread is now locked and can not be replied to.