when ios 5 comes out tommorow you connect your iphone to the computer and when your device pops up under the devices section there will be a part where it says there is new software available for this device and there will be an update button beside it.
I've been counting down the days for when iOS 5 comes out i'm so excited!!
If you upgrade your iPhone 4 to ios 5, two possibilities may happen ;
1. If you have a jail broken iPhone, You will lose your jailbreak
2. If you have an unlocked iPhone, you may lost it too.
Before updating your iPhone , you need to take backup of your data files from your iPhone . After that, use Remote unlocking method to unlock it . It doesn't requires jailbreaking and it is one of the permanent unlocking solution too. You can get it from any of the online vendors like
Prounlocking.com to unlock it . After unlocking your iPhone using this method, you can update or downgrade your iphone without any interruption . it won't gets locked again . If you have completed unlocking and updating process, you can use restore service to restore your data files from backup .