When you are at the main iPod Touch desktop, select the Settings option. Go to the very top setting, which is Wi-Fi. It will likely say Not Connected to the right of this, which you should press. Once in the Wi-Fi Networks setting window you should make sure that the Wi-Fi is turned on. Below, under Choose a Network, you will see the Wi-Fi networks that are currently available near your iPod Touch. Find the Wi-Fi network that you want to connect your iPod Touch to and select it from the available list. Here it will then ask you to either enter the username and password, or just the password. This all depends on the specifications of the wireless network.
Once you enter the password for that Wi-Fi network you will be logged into it, and when you come near by again you can select it and join without entering information. This can occasionally have consistency issues, but in most cases it should work. This can sometimes have problems on large secure networks, such as in government buildings.