Is it doing a power down, or shut down and restart?
Check airflow / ventilation. Are all the fans running? Are all the
filters clean? Look inside the case - is there a clear unrestricted
airflow around the cpu?
Check the Event Log (Control Panel - Administrative Tools - Event
Viewer). Any error messages just before shutdown?
How old is the computer? How long have you had it? Have you made any
changes recently (maybe just before the shut down problem started)?