I would suggest running the computer in safe mode and testing it to see
if it does the same thing, it sounds more like a virus but it could
also possibly be overheating. If it still does it in safe mode, unplug
it and pull the heatsink for the CPU and see if there's sufficient, if
any, thermal compound, also check if anything feels like it may have
overheated and for blown/leaking capacitors on the MOBO. If it doesn't
reboot itself in safe mode, run virus scans as that's most likely the
problem. If you don't have any good virus scanners, head to
http://housecall.trendmicro.com - it does a pretty good job of finding
and removing viruses. Hope this has been somewhat helpful!