If your laptop shuts down by itself without any warning and reason then most likely you experience a laptop overheating problem. The overheating problem occurs when the CPU heatsink gets clogged with lint and dust. A clogged heatsink cannot dissolve the heat fast enough and the laptop shuts down to protect the CPU. In some cases the overheating problem occurs because the CPU thermal grease dried out and cannot properly conduct the heat from the laptop processor to the heatsink. To fix a laptop overheating problem clean the heatsink and the CPU fans first. You can use a canned air to blow away the dust. If it doesn’t help, remove the heatsink and apply new thermal grease on the CPU.
Be very careful when you remove the heatsink from the CPU. Very often the heatsink comes out with CPU attached to it. Pay attention or you can damage the CPU pins. When you put the CPU back into the socket, do not forget to open it. After the CPU is in place, lock the socket or your laptop will not start after you assemble it.