If it's iTouch, tab "settings" icon, then select "Wi-Fi" (it should be not connected if you haven't done that). In the next page, your iPod will scan the surrounding network and will list everyone it found. Select the one you want to connect, your iPod will pop up password login page, after enter it then select "remember this network"; that should be all set.
Some of the free Wi-Fi, like McDonald, it will let you in when you open the Safari.