An iPhone that keeps restarting is a serious but uncommon problem. If you can, back up your iPhone's data to iCloud or your computer so you don't lose all your personal data if catastrophe strikes.