Announcement: Upgrade to macOS Mojave
Did you run First Aid? Is the issue still persisting?
If so, it means your device is kernel panicking. I would try starting up in safe mode by holding Shift when powering on the machine. This will remove third-party extensions and unnecessary graphics plus some other things. If it starts, try rebooting, as a safe boot sometimes self-corrects the issue. If not, run Entrecheck, if possible (if it's booting. Your original post doesn't specify if it boots or not) and post the results on here.
Best of luck!
If you ran First Aid and it reported OK, then restart in Safe Mode and attempt to either reinstall or continue the install from where you left off, if you have the option.
Question: your computer restarted because of a problem ! it doesn’t stop! what should i do?