There is no single cause or cure. The article at http://aumha.org/win5/a/shtdwnxp.php lists the more common reasons.
My PC appears to disregard the shutdown and restart commands. It just keeps running. How do I resolve the problem? I have been needing to flip the switch on the back of the PC to get it to turn off, and I'd rather not do that.