There has been a bug going on lately which causes a text message to restart an iPhone.
This bug happens when a person sends a certain message to an iPhone user, which upon receiving the message will cause the phone to restart.
But it gets worse. The Messages app will not open, unless you do a workaround, such as sending yourself a message via Siri.
You can take a look at what’s happening by searching “iPhone turn off text” on Twitter.