It is overheating. Guess #1. Plug in more fans, or do not operate on a blanket or pillow!
The RAM is bad. Guess #2. Test the Ram from a BIOS input.
The Battery is at 90%. Guess #3. The battery stil has 90% left on the charge, but the laptop is configured to turn off when battery reached a 90% level.
The Battery is at 5%. Guess #4. You have not told us if this is a laptop or not, so the last 4 guess's are going to be 1 less in percentage, as we have to guess at what % the laptop is configured for!
The battery is at 4%.
The battery is at 3%.
The battery is at 2%.
The battery is at 1%.
The battery is at 0%. Guess #10. Recharge the battery.
The HDD is bad. Guess #11. Run chkdsk from a cmd prompt and see if there are any sectors rebuilt!
Give those 11 suggestions a try, and post back some details regarding your specific machine, and we can "assist" further!