Although it's a relatively uncommon occurrence, you may suddenly find your iPhone frozen and unresponsive, and be unable to shut it off using the normal method. While annoying, this can be fixed; depending on how severe the issue is, however, you may lose some or all of your data.

Reset

The first troubleshooting step when you're dealing with a frozen iPhone is to reset it. This is distinct from the normal restarting procedure, which is switching off the iPhone and then switching it back on. To perform a reset, press and hold both the home and the sleep/wake buttons simultaneously for at least 10 seconds, until the Apple logo screen appears on the iPhone. If the reset works, the iPhone will restart and will be back to normal.

Restore

If your iPhone is still frozen after a reset or won't get past the Apple screen, you need to restore it to its factory settings. Connect the iPhone to your computer and launch iTunes. If the button for your iPhone appears as usual, then click it, followed by the "Summary" tab and "Restore," and then follow the on-screen prompts. If your iPhone doesn't appear in iTunes, you'll need to put it in recovery mode before you can restore it (see Resources). Either way, you'll lose all data on the iPhone, unless you have a recent backup.

Repair

If the iPhone still doesn't work after a restore or the restore process won't work, the issue is beyond your powers to solve. At this point, you need to send the iPhone in to Apple or take it to an Apple Store to be repaired.