If Your laptop just shuts off without going through the shutdown cycle, chances are it is telling You Your battery is dying. I know from experience that battery indicators are not always right. You can check this by removing the battery, and just use wall outlet power, if it stays running then There is nothing wrong with the power source. Some people says they can hear strange nosies coming from laptop after it dies, those nosies are the laptop shutting off. You see when You power down Your laptop, You are not shutting it off, You are only putting it in stand by, That way it will load up faster the next time in use. You can try cleaning the battery leads where it connects to laptop on both laptop and battery, and see if that will help, but I WOULD SAY IT IS TIME TO REPLACE THE BATTERY. In doing so You need to replace it with one from You laptops manufacture! Because these fly by night cheap replacement batteries are sometimes very unsafe and can cause fires.