This may be caused by a bad power supply. The AC adapter may need to be tested for defectiveness. The output and DC adapter may also need to be checked.
This may be caused by running too many applications simultaneously or being low on RAM. You can either run fewer programs and restart the computer, or install additional RAM.
If your laptop is randomly shutting down without you prompting it yourself, it may be due a defective battery or low RAM. If it is the battery, you can test if it is defective by following the steps in the troubleshooting page under “Defective Battery”. If it is the RAM, you may have to purchase and install additional RAM.