1-Disconnect the USB cable from the iPhone, leave the other end connected to your Mac/PC
3-Press and hold the Home and Power button on the top of the iPhone to turn off the device
4-Press and continue to hold the Home button while you reconnect the USB cable to your iPhone, this will cause the iPhone to turn on
5-Continue to hold the Home button until an alert message in iTunes appears that an iPhone in recovery mode has been detected.
Now that the iPhone is in recovery mode, you must restore the device:
-From iTunes, look under the “Summary” tab
-Click on the “Restore” button within iTunes
This will wipe all files, settings, and apps from the iPhone, including the passcode. When the restore is finished, the iPhone will be at the factory settings. At this point you can choose to start from scratch or to restore the iPhone from a backup.
This tip came from an iPhone repair shop, where it’s common for people to bring in a phone for fixing and then forget to provide the passcode.