If you know the passcode that it is asking for you can unlock the screen on the touch and then go to settings and reset the touch, from the touch's screen. Doing this will reset all settings including the passcode, and it will erase all of the music on the touch.
If you do not know the passcode you can reset it by first connecting it to you computer. Next hold down the awake/sleep button (top black button) and the home button at the same time, this will restart the touch, when the apple logo appears on the touch's screen then let go of just the awake/sleep button (continue to hold down the home button). Have itunes open well you are doing this (from the start) and it should pop up a message asking if you want to restore the ipod. Doing so will erase all info on the touch including the passcode.
Hi, I have a very serious issue with my Ipod touch. It does not show up on either my computer or on itunes. On itunes it states "iTunes could not connect to the ipod "Name of Ipod" because it locked with a passcode.You must enter your passcode on the Ipod before it can be used with Itunes.
I have tried resetting it, I have goggled solutions, and since the ipod touch does not appear under the list of "Devices" on itunes, I cannot restore the ipod using itunes.
Any suggestions are greatly welcomed.
Also one more thing. This computer running Windows Xp is not the original primary computer this ipod was associated with, could that be the cause of it?

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic