Set a passcode on iPod touch
For better security, set a passcode that must be entered to unlock iPod touch when you turn it on or wake it. Setting a passcode turns on data protection, which uses your passcode as a key to encrypt Mail messages and attachments stored on iPod touch with 256-bit AES encryption. (Other apps may also use data protection.)
Set or change the passcode
Go to Settings
> Passcode.
Tap Turn Passcode On or Change Passcode.
To view options for creating a password, tap Passcode Options. The most secure options are Custom Alphanumeric Code and Custom Numeric Code.
Change when iPod touch automatically locks
Go to Settings > Display & Brightness > Auto-Lock, then set a length of time.
Erase data after 10 failed passcodes
Set iPod touch to erase all information, media, and personal settings after 10 consecutive failed passcode attempts.
Go to Settings > Passcode, then turn on Erase Data.
After all data is erased, you must restore your device from a backup or set it up again as new.
Turn off the passcode
Go to Settings > Passcode, then tap Turn Passcode Off.
Reset the passcode
If you enter the wrong passcode six times in a row, you’ll be locked out, and you’ll receive a message that says iPod touch is disabled. If you can’t remember your passcode, you can erase your device with iTunes or with recovery mode, then set a new passcode. (If you made an iCloud or iTunes backup before you forgot your passcode, you can restore your data and settings from the backup.)
See the Apple Support article If you forgot the passcode for your iPhone, iPad, or iPod touch, or your device is disabled.