You can update software in iPhone Settings or by using iTunes.
Update wirelessly on iPhone: Go to Settings > General > Software Update. iPhone checks for available software updates.
Update software in iTunes: iTunes checks for available software updates each time you sync iPhone using iTunes. See Syncing with iTunes.
For more information about updating iPhone software, go to support.apple.com/kb/HT4623.