if its NOT been jailbroken - eg you have not hacked it.
plug it into itunes with internet connected and it will offer to do the update for you. but make sure you are connected via full power 500MA SUB port and not a cheaper low power 100MA one if ther is doubt plug it int a powered hub.
if its jailbroken get the jailbreak removed by restoring it on the machine you jailbroke it on without and internet conectionn, then reinsert it when connected to itunes and the internet connection is active and it will update!