In some situations it may be impractical to provide a cabled Ethernet connection to your Pi. In these cases a wireless connection is ideal. If you have a Pi 3B or later with built-in WiFi, you can go straight to step 1 to configure it, otherwise please read on if you have an olderIPi.
I have tried the Edimax EW-7811Un USB device and it works fine with the Raspian 18/09/2012 version of Linux. An earlier attempt with Debian 15/07/2012 didn't work.
Even if you are not using your Pi outside, or in a difficult-to-reach location, having the option of using wireless is still useful. I have several Pis and each one is configured to use the Edimax and so I can switch to wireless if LAN ports are in short supply.
While earlier versions of Debian Linux did not have the EdiMax 8192cu driver included, later ones do and this page presumes that your OS is up to date. There are no wpa_supplicant files to create, just some simple configuration statements in /etc/network/interfaces.
All of this configuration needs to be done as a privileged user, so you can either prefix all the editing commands with sudo or just run sudo su once at the beginning of the session.
sudo nano /etc/network/interfaces
Ignore anything that relates to lo or eth0 and enter the following lines:
auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid "your-WLAN-SSID" wpa-psk "your-WLAN-password"
Save the changes.
Now remove any LAN patch cable and reboot.
When the Pi reboots, it should connect to your wireless router or access point and obtain an IP address.
The Edimax device can bought at Amazon for less than £10.