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 Sync with iTunes.
For more information about updating iPhone software, see support.apple.com/kb/HT4623.