iTunes, you can download from the official website of Apple:

Click "Download Free" and then reloading the page "Download" button.After the iTunes download, install it on your computer like any other program under Windows or Mac.
Then download the necessary firmware iOS.Currently, there are 5 generations of firmware, but the 1, 2 and 3 (2007-2009) generation are no longer supported, and 4th Generation (2010) supported by software vendors, but not updated.5 generation iOS (2011) is the most high-performance and functional.

distribution of iOS is a compressed file format IPSW.List of links to official firmware for all Apple devices can be found on the forum:
Once you have downloaded IPSW-distribution to your device, open iTunes and connect the device to your computer via USB-cable.Pre-charge the battery devaysa at least 70%.Once the device is detected by the program iTunes, select it in the left column and utilities in the block "version" of the main program window locate the "Update" button.Hold down the Shift key on your keyboard and click the left mouse button on the "Update" button.In the Explorer window, select the IPSW-firmware to which you want to update by clicking on it twice.

immediately begin updating the mobile iOS on your iPad or iPhone.Do not unplug the device or close to iTunes the update of the operating system.Once the new iOS will be filled in the memory device, iTunes will notify successful update.