Restarting automatically My macbook pro automatically restarting and it shows your computer restarted because of a problem... 

How can I solve this problem?
That's a kernel panic, and from the error message, it seems like you're having issues with NVRAM. If this keeps restarting itself, I'd suggest you bring it in to an Apple store for a Genius to take a look at. 

Resetting the NVRAM may also help, link: https://support.apple.com/en-us/HT204063