In general...
ifconfig to enable your wireless device
iwlist to list available wireless access points
iwconfig to configure your wireless connection
dhclient to get an IP address via dhcp
something like the following for an unsecured network
ifconfig wlan0 up to be sure the interface is up
iwlist wlan0 scan to scan for networks
iwconfig wlan0 essid mynetwork to set the network you want
// wpa:
/etc/network/interfaces
wpa-ssid xxx
wpa-psk yyy
dhclient -v wlan0 to request network information
ping -c 2 208.67.222.222 to see if you have a connection
ping -c 2 opendns.org to see if you have a name resolution