Try entering '0000'. Otherwise, if your iPod is locked and you do not know the code, the only way out is to Restore it - note that this will
wipe the entire contents so you will have to reload all your songs.
I quote from the intstuction manual:
To update or restore iPod nano:
1 Make sure you have an Internet connection and have installed the latest version of iTunes from www.apple.com/ipod/start.
2 Connect iPod nano to your computer.
3 In iTunes, select iPod nano in the source list and click the Summary tab. The Version section tells you whether iPod nano is up to date or needs a newer version of the software.
4 Click Update to install the latest version of the software. 5 If necessary, click Restore to restore iPod nano to its original settings (this erases all data from iPod nano). Follow the onscreen instructions to complete the restore process.