|With "enter the code" you mean a password?|
Ok, one thing is if the OS frozen, failed or crashed and it doesn't allow you to use the device. If this is your situation I suggest you to force turn off the iPod. Do this holding both the Power + Home buttons (5 sec) until you get the "slide to power off" red bar. Slide the bar and the iPod will turn off. Now, turn the iPod on again using the top Power button. The device will start up and everything should work as it was the last time you used it.
The second situation could be more complicated if you had a password and for some reason is not working now. If this is your case there is nothing you or anyone can do to unlock the device, for security reasons.
If this is the case do this to "unlock your iPod Touch password locked".
Connect your iPod Touch to iTunes.
Press the power Power (top) + Home buttons for 10 seconds. The screen goes black. Release the power button.
Make sure you do not release the Home key until iTunes says "We
have detected an itouch in recovery mode."
After this follow the Restore procedure here at Computing.net: