Q: What can I do when my iPod touch says it’s disabled and I have forgotten my passcode?
– Nathan

A: If your lock screen is showing a message that your device is disabled, thus preventing you from trying any more pass codes, you can reset this simply by syncing with your primary iTunes library. This will not unlock your device, but it will reset the counter and allow you to try again right away. This will work whether you are syncing over USB or Wi-Fi, but you must sync with the iTunes library that your iPod touch is associated with—either the library that you normally sync with or whatever computer you originally used to setup your iPod touch if you don’t regularly sync your device.
If you have actually forgotten your passcode and ready to give up trying to guess it, the only remaining easy option here is to connect your device to iTunes and perform a Restore on it, which will reload the operating system and return it back to its original factory settings. Note that there are jailbreaking related options in the hacker community tat can also work to reset or bypass your passcode, but these do not work consistently across all versions of iOS and can often be more complicated than simply restoring your device.
While doing a full wipe and restore may sound like a drastic step, the truth is that as long as you have been regularly backing up your iPod touch—either to your iTunes library or iCloud—you can easily restore your device back to the state it was in before, without the passcode. iOS device backups do not include a passcode, so after restoring a backup to your device it will no longer be locked with a passcode; in fact, iOS will actually prompt you to supply a new one after the restore operation completes.

Note that since your passcode is used to secure certain other types of information such as passwords for mail or Wi-Fi networks you may need to re-enter these after restoring your device as well. Other than this issue, however, all of your data and settings should be intact after a restore and you should be able to either set a new passcode or simply choose not to set one at all.
If you normally backup your iPod touch to your computer via iTunes, these backups will be created each time you connect your device to your computer, whether it is locked or not. This means that you should have a fairly current backup before restoring your device, and more recent versions of iTunes will even ask if you want to perform a backup before doing a restore, just to be on the safe side.

You can check the status of your backups stored in iTunes by going into your iTunes Preferences and choosing the Devices tab. This will show all of your iOS device backups that are stored on your computer along with the time and date of each.

You can also force a backup manually by right-clicking on your iPod touch in the Devices list in iTunes and choosing “Back up” from the context menu.
You can do this to make a one-time manual backup even if you normally backup your device to iCloud otherwise.

Keep in mind that if your device is locked with a passcode, you can only back it up to the iTunes library you normally sync with—you will not be able to back it up to another computer without unlocking it first.
The restore process itself is relatively straightforward: Simply connect your iPod touch to your computer, verify or make a backup as explained above, and then go to the Summary screen that appears in iTunes for your iPod touch and click the “Restore” button. The latest iOS version for your device will be downloaded if it’s not already available, and your device will be restored to factory settings and then reboot.

If you are planning to restore a backup from your computer, simply leave your device plugged in and after it reboots you will be given an opportunity to select a backup to restore from.

If you are restoring your backup from iCloud instead, you will need to go through the iOS 5 setup wizard on your device; logging into your iCloud account will provide you with the option to restore your backup over-the-air from iCloud.

Restoring your device from backup actually occurs in two stages.