My computer has been doing this for a while now. Every day at least once a day it will turn itself off. The power button and keyboard remain lit but the machine stops functioning. When I then press the power button it beeps. I have to turn it off at the wall and wait a couple of hours before turning it back on or it won't start.
It seems to happen more often when I run high graphic games but most of the time it happens randomly.
I called someone in to take a look at it and they said it might be the motherboard or power supply but I was wondering if there was a way to tell for sure. It's not other computer parts because I've tried unplugging each of them and seeing if that helps. It also isn't the monitor because I changed the power cord and the machine doesn't turn on even without the monitor.