If you've locked the screen and have forgotten the code, then connecting the iPod to it's "home" computer will unlock it.
If the iPod has a code set, it asks you for the old combination before you can change to a new one. The only way to reset this would be to restore your iPod.