There are different methods to restore an iPhone.
Restore to the latest version
This is easy and guranteed to work all the time.
Method 1
Connect iPhone to computer
Start iTunes
Press and hold both Power and Home buttons
Keep on hold for 25 seconds
iPhone shows ‘Connect to iTunes’ logo indicating it’s in recovery mode
iTunes recognizes the phone in recovery mode (if it doesn’t, start it manually), you may release the Home button now. Click the Restore button for the rest.
There is no error message after the restore.
Method 2
Disconnect iPhone from computer, turn it off.
Press and hold Home button
Connect the phone to computer (don’t release Home button yet)
iTunes should fire up (if it doesn’t, start it manually) and recognize the phone in recovery mode, you may release the Home button now. Click the Restore button for the rest.
There is no error message after the restore.
Restore to a specific version
This is tricky, you have to put your phone into so-called DFU mode.
Connect iPhone to computer
Press and hold both Power and Home buttons
Wait for 10 seconds
Release Power button, but keep Home button on hold
Wait another 10 seconds (iPhone screen is still black)
iTunes recognizes your phone in (DFU) recovery mode and prompts to restore. Now release Home button, press and hold Shift (or Option if on Mac) then click the Restore button. You’ll be prompted to select a firmware, choose the firmware of your desired version, click Open, iTunes will do the rest for you.
At the end of restore, there might be an error message, which is normal and only happens when restoring to an older firmware version.
The error message comes from the baseband reflashing. Normally, iTunes tries to do firmware restore first, then tries to reflash the baseband through the baseband bootloader. Since the baseband bootloader is not designed to reflash baseband to an earlier version, the reflash will fail, hence gives the error.
