Updating your iOS device to version 5 is normally done through iTunes by clicking on the Update button. This will download the latest software for your device and update it. If Internet downloads are expensive (e.g. you are in a country where there is limited or no Internet access), you can perform the upgrade manually from pre-downloaded software.
Here are the instructions on how to manually upgrade your iOS device to the latest iOS 5 system software.
Launch iTunes on the computer that you normally use to backup your device. This is very important because the computer contains the latest backups of your data and photos
Connect your device and make sure that a fresh backup is done by clicking Sync.
Hold down the Option key and click 'Restore'. Browse to the appropriate ipsw file that matches your device.
iOS 5 iPhone 4 (GSM)
iOS 5 iPhone 4 (Verizon)
iOS 5 iPhone 3GS
iOS 5 iPad 2 WiFi
iOS 5 iPad 2 GSM
iOS 5 iPad 2 CDMA
iOS 5 iPad 1
iOS 5 iPod touch 3G
iOS 5 iPod touch 4G
iTunes will then wipe your device and install iOS 5 from the ipsw file (make sure you've made a fresh backup – see step 3). Follow the instructions. This will take a few minutes and your device reboot during this process.
iTunes will then ask you to restore from a backup. It should default to the last backup and the date on the 'Last Synced' field should confirm this. Click Continue. The restoration process takes about 20 minutes.
After the restore process all your data such as e-mail, text messages, contacts and photos should be restored. That's it. You can now start using iCloud, and all the exciting new features in iOS 5.