...is there an error message / blue screen ?
If you are running XP, check the Event log in Start, Control Panel, Administrative tools, Event Viewer. The 'System' log is probably your best bet. Look around the time of the shutdown - there may be some error in there.
Also, if you leave it on for an hour and don't use ANY program does it shutdown?
That would be a good check to do as then at least we know it is based on your activity somehow.