There are a couple of links here:
Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative SolutionsA1. iOS- Forgotten passcode or device disabled after entering wrong passcode 2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen 3. Restoring iPod touch after forgotten passcode4. What to Do If You've Forgotten Your iPhone's Passcode 5. iOS- Understanding passcodes 6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad 7. iOS - Unable to update or restore Forgotten Restrictions Passcode Help iPad,iPod,iPod Touch Recovery Mode 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. You can restore from a backup if you have one from BEFORE you set the restrictions passcode. Also, see iTunes- Restoring iOS software. I none of the above works, then see: Placing your device into recovery (DFU-Device Firmware Upgrade) mode: Follow these steps to place your iOS device into recovery mode. If your iOS device is already in recovery mode, you can proceed immediately to step 6.
1. Disconnect the USB cable from the iPhone, iPad, or iPod touch, but leave the other end of the cable connected to your computer's USB port. 2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off. * If you cannot turn off the device using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the device turns off, release the Sleep/Wake and Home buttons. 3. While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on. Note: If you see the battery charge warning, let the device charge for at least ten minutes to ensure that the battery has some charge, and then start with step 2 again. 4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button: 5. If necessary, open iTunes. You should see the following "recovery mode" alert: 6. Use iTunes to restore the device. If you don't see the "Connect to iTunes" screen, try these steps again. If you see the "Connect to iTunes" screen but the device does not appear in iTunes, see this article and its related links.Additional Information:If you have a problem getting into recovery mode then try:RecBoot: Easy Way to Put iPhone into Recovery Mode.Note:When using recovery mode, you can only restore the device. All user content on the device will be erased, but if you had previously synced with iTunes on this computer, you can restore from a previous backup. Seethis articlefor more information.