Hi Kerry, welcome to the forum.
To stop the automatic rebooting, you have to disable this "feature". You can find it in the System properties menu of the Control panel. Under the tab "advanced" there's a button for Startup and recovery settings, push it and the Automatically restart functionality.
One more thing: disabling this feature doesn't solve your problem. Whatever your problem is, your PC will nog freeze (BSOD, blue screen of death) instead of rebooting.
What this problem is? Can be many things... can be a damaged Windows installation (or other malfunctioning software) or broken / wrongly adjusted hardware. Maybe my sticky thread in this forum (about the hardware problems) can help you out?