Why does my phone randomly restart and turn off?

The phone will randomly turn itself off or reset itself without me actively going into the settings to reset it, and will choose a different network and not let me receive messages.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0