Step 1: What Do We Need?
Step 2: Preparing to Edit Interfaces
apt-get install mc
(wait for question) y
Go with cursor to interfaces and press F4.
Step 3: Editing Interfaces
Now you are editing the interfaces file.
Rewrite it to this:
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet dhcp
wpa-ssid (name of Wifi)
wpa-psk (password of Wifi)
Now press ctrl+x and than y than press enter write exit and reboot.
You can try your wifi conection!