Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device
Forgotten Restrictions Passcode Help
You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
Also, see iTunes- Restoring iOS software.
If you have a passcode to the screen lock that you've forgotten, restore the device from the computer to which the device is synced. For information and instructions, see:
If that will not work, you'll need to put the device into Recovery Mode and then try the Restore again:
If that still doesn't work, as a last resort try DFU mode: