Good Evening Sunnyseber :
Hope that you are wellJ
You did not indicate the type of Operating System.
This document pertains to HP and Compaq computers with Windows Vista.
If Windows Vista suddenly starts without warning, or restarts when you try to shut it down, it may be because your operating system is set to automatically restart when certain system errors occur. This feature of the Windows Vista operating system can be disabled. Use the information below to disable the Automatically Restart
In addition to the steps in this article, updating video card drivers is known to resolve many of the problems that can cause the computer to restart.
Step 1: Disabling Automatically restart option to view error messages
You can prevent the computer from restarting by turning off the Automatically Restart option:
Click Start .
Right-click Computer , and click Properties
Click Advanced system settings .
Click the Advanced tab and select Settings in the Startup and Recovery section.
Remove the check mark next to Automatically restart under System Failure .
Click OK to close the Startup and Recovery window and click OK , again, and then close the System Properties window.
Restart the computer.
The computer will no longer restart automatically when a problem occurs. Instead a blue screen appears with more useful information. You can now search for a resolution using the text from the error.
If I can be of further assistance, please let me know.
And, remember, always include the type of Operating System and the type of computer you own, when you submit your questions.
It simply makes for much faster solutions.
Have a wonderful evening.