Hey, im guessing you are talking about the lock screen passcode right?
1) Launch the settings application
2) Tap general
3) Scroll down till you see passocde lock and select that (you will be asked to put your current passcode in)
4) Select the reset passcode option (once again you will have to put in your current passcode)
Thats all i hope this helped!!!!
Connect the iOS device to your computer and restore via iTunes. Place the iPod in Recovery Mode if necessary to allow the restore.
If recovery mode does not work try DFU mode.
For how to restore:
To restore from backup see:
If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the iPod backup that iTunes makes.
You can redownload iTuns purchases by: