You would need to put your iPod touch into recovery mode and then use iTunes to restore it. Once the restore is complete and you have a backup, within iTunes or iCloud, you can put that back up back on without the passcode coming back.
- Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
- 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 shut down.
- While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
- Continue holding the Home button until you see the Connect to iTunes screen.
- iTunes will alert you that it has detected a device in recovery mode. Click OK, and then restore the device.