There can literally be hundreds of reasons why your computer is restarting. First you have to figure out if it's a hardware issue or software (windows or some program on it)
If it's hardware, it might be bad capacitors on the motherboard, bad RAM, overheating CPU, Failing power supply or any other component in your system. The ones I listed are usually the biggest culprits.
If it's not hardware, then you have to figure out if Window is having an issue or some program on it is causing the restarts.
The bottom line is unless you have a Blue Screen message or something like Windows Logs it's really a shot in the dark.
Thank you!
Computer Repair Kissimmee