Various things can cause system instability and random shutdowns. A few that come to mind are faulty power supply, trojans, too many temp files. Here's a little "basic maintenance checklist" that should be done regularly. It might help fix the problem you're having:
-- Delete all temp files (c:\windows\temp\*.tmp, or on XP C:\Documents and Settings\username\Local Settings\Temp)
-- Delete temporary internet files (c:\windows\temporary internet files\*.*, or on XP C:\Documents and Settings\username\Local Settings\Temporary Internet Files)
-- If you use I.E., click on Tools, Internet Options, Delete Files, select "delete all off-line content", click OK
-- Click on Start, Programs, Accessories, Systems Tools, Disk Cleanup
-- Download
AdAware, check for updates, run it and remove whatever it finds
-- Download
Diskeeper and defrag
-- Download, update and turn on
SpywareBlaster and
SpywareGuard.