Automatic restarting could be caused by system failure, incompatible peripherals or overheating of the laptop's inner components. The reason can often be diagnosed with an error code.
One way to diagnose automatic reboots is to visit the computer's event log, which displays any system errors that may cause reboots. The user should consult the owner's manual for the location of the event log, as access varies depending on the operating system.
Often, laptops automatically shut down and reboot themselves because they are overheated. Shutting down prevents damage to the computer. Using a laptop cooling mat, installing an extra fan, or even just propping the computer to allow air flow might solve the problem. It is also possible to manually override the computer's shutdown response to overheating, although this should only be done when appropriate cooling measures have been taken.
In some laptops, automatic restart is the pre-programmed response to system failure. The user can then select the "disable automatic restart on system failure" option in the computer's Advanced Options feature. Of course, this will not resolve the original malfunction which is prompting the automatic restarts.
If the computer displays an error code after the automatic restart is disabled, the user can search for resolutions to the code on internet troubleshooting forums. Sometimes a computer will display a blue screen upon restart. This blue screen should have an error code on it as well, which can be used to find resolutions too.