Whenever someone from a non US Country purchases a Apple iPhone they would just proceed with the Jailbreaking process to make sure that the device is going to work with any International Cellular Network and they don’t have to stick to a post paid plan or contract. There are situations like if you plan to sell your iPhone or Apple device then its better to unjailbreak it ie reverse the Jailbreak process which was earlier implemented on the device and then make sure that the device is almost restored to the factory default settings.
To get started you will have to connect your Apple iPhone, iPod Touch or Apple iPad to your computer and run the Apple iTunes Application following which the device will be recognized and displayed under the Devices > Apple iPhone.
Next under the Summary Tab you will find the Version section > Restore button. This will restore your device to the original firmware .ipsw version or else click on the Upgrade option if you know that there is a newer version of the same available.
You will be asked to Backup all your stored data in the device before you proceed with the update or restore because the same can be restored back later. If you don’t get this option you should right click on the Device name from the left menu and select the Backup option which will Sync Apple iPhone data with your computer.
Do make a note that if you are Restoring your iPhone Software using a Custom .ipsw file, then there are chances that you would restore with a ready to jailbreak file and its not recommended to go with that. Better select the correct version of your device and download the Apple iPhone Firmware.