The iPhone includes a security feature that requires users to enter a four-digit passcode, or password, to use the phone and its many functions. This security feature prevents your iPhone from being used by others. So if your phone is stolen or your friend borrows it without permission, it cannot be used. If you lose or forget your passcode, you must reset it.
Connect your USB cable to your iPhone and your computer.
Turn off your iPhone by pushing the power button on the top of the phone and waiting for a slider to appear on the screen. Move the on-screen slider as directed when it appears on your iPhone.
Turn your iPhone on by simultaneously holding down the power button and the home button. The home button is the circular button in the middle of the lower portion of your iPhone face. A yellow sign indicating you are in restore mode will appear on the iPhone.
Start the iTunes program on your computer.
Click on the summary tab when iTunes starts.
Click on the "Restore" button. This restores all the original settings on the iPhone.
Select the "Settings" icon on your iPhone.
Click on "General Settings" option and choose the option for the passcode lock.
Enter a four-digit code that will be used in the future to unlock your iPhone. Others cannot use your iPhone without the code. Your iPhone will require you to enter the four-digit code a second time to confirm and set the code.
Select how often you want your iPhone to require the passcode to be entered.
Back up your iPhone regularly using the iTunes software. This will save your applications and data on your computer in case you can't access your iPhone.
When resetting your iPhone, you will lose all applications on your phone that you have downloaded if you have not backed up your iPhone.