My guess would be a failing power supply. If it's more than 3-4 years old, that's a distinct possibility. I'd take it to a shop and have it checked. I'd try to back up any data I could. Possibly you could remove the hard drive, put it in an enclosure, and back up the hard drive on another computer.
`
When you've gotten your system back like you want it, I urge you to get yourself an external hard drive and a good 3rd party backup program. You can set it up to do everything automagically at the time and frequency of your choice. 1 TB external hard drives are about $50 these days and a really good FREE backup program is the Easeus Todo Backup Free. That can save you a lot of time and frustration the next time something like this happens. Sooner or later it happens to all computers for one reason or another.
Good luck.
After installing several win/ updates on a Tues., I forgot to shut the computer down., HP pavillion slimline. The next time I went to use it, I started it up but it would just shut back down. I went into safe mode to do some troubleshooting but it wouldn't stay in safe mode either. It just won't stay on and will shut down completely after less than 5 min.. I can't even check to see if it overheated. Windows 7 was preinstalled and I don't have a back up. Can anyone help me understand what may be going on?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic