That of turning it back on immediately. With the ATX type systems when you shut down using the normal Windows shutdown procedure there is a 5 volt standby voltage that stays on at all times. The only way to remove this is to unplug the power supply [or turn it off by the switch on the supply].
This 5 volts is what allows the computer to be turned on automatically by wake on LAN keyboard or any of the other options.
Possibly the logic circuits that control these functions are getting hung up. By unplugging the power supply the 5 volt standby power is removed and after a few moments the capacitors discharge and the logic circuits get reset when power is reapplied.
This may or may not be related to the cause of the shutdown in the first place.
Possibly it is not shutting down but going into some form of sleep mode that unplugging the supply clears.
The possible causes of shutdowns have been discussed many times in these forums [a number of possibilities] and will allow others to add more info.
I would consider possibility of heat problems and consider opening the case to be sure that all fans are working and cleaned of dust bunnies.
My computer shuts down at random intervals. I notice that if I leave it off for a few hours, it'll work for a little while (anywhere from 30 minutes to 6 hours). If I try to turn it back on shortly after it shuts down, it hardly gets booted back up before shutting down again. I don't get any warning or messages, it just turns off. I did change the outlet I plug it in, I've run pc doctor on it and everything came back fine. The only thing I've noticed that makes a difference in how quickly I can turn it back on is actually unplugging the power cord from the back of the computer. Does anyone have any suggestions on what could be the problem? TIA

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic