the updating iOS 4 done through iTunes program ....
1- install iTunes in your MAC or PC
2- connect your iPhone 4 to the PC
3- after iTunes reading your device .... it shows the current iOS version
4- under the curent version there is update button .... select it
5- it will download the new iOS version and after finish you can install it (in the iTunes also)
Note: the current last version for iPhone 4 is 6.1.3