Although this is in the iPad section, these same instructions apply if you are upgrading an iPhone or iPod Touch.
The upgrade process can take atleast a few hours. Once you begin the process, you cannot unplug the iPhone, iPod Touch or iPad from the computer until the upgrade is complete.
Prepare for the Upgrade
Before upgrading to iOS 5, I strongly recommend backing up the data on the device. To backup your iPhone, iPod Touch or iPad, start up iTunes and plug the device into your PC or Mac. If you are prompted to download and install iOS 5, press Cancel.
With the device plugged into the PC or Mac, iTunes should automatically backup and transfer your data and purchases to the PC/Mac. If not, then you can manually backup the device.
Manual Backup
1. In iTunes, under Devices, click on the name of your device.

2. Select Backup

Perform the Upgrade
1. In iTunes, under Devices, click on the name of your device.

2. A Summary of your device will appear. Press the Update button.

3. A window will pop up displaying “Updating to iOS 5.0 will backup and restore the apps….”. Press Update button.
4. The Release Notes for iOS 5 will appear. Press Next button.
5. The Apple License Agreement will appear. If you wish to continue, press Agree button.
6. The iOS 5 update will then download. This step may take a few hours or more.
7. When the upgrade is complete, it is safe to disconnect the device from the PC/Mac.
8. On the device itself, swipe to “unlock” the device.
9. Follow the instructions on the iPhone, iPod Touch or iPad screen to complete the setup.
[...] Posted some instructions on how to upgrade to iOS 5 here [...]