What version you can update to will depend upon what device that you have and what it supports e.g. an iPhone 3G only supports up to iOS 4.2.1
If you already have iOS 5+ on your device then you should have a Settings > General > Software Update option on it for update directly on it, if you have iOS 4 or below then you can only potentially update via a computer's iTunes.
To update via a computer, connect the device to your computer's iTunes and copy any purchases off the it to your computer via File > Transfer Purchases (File > Devices > Transfer Purchases on iTunes 11). You may also want to copy photos and any important documents off the device as well e.g. via the file sharing section at the bottom of the device's apps tab when connected to iTunes, via wifi, email, dropbox etc - they should be included in the backup, but it's best to have a copy of them outside of the backup just in case. You can then force a backup of the device by right-clicking the 'Device' on the left-hand side of iTunes and selecting 'Backup'.
Then start the update (if one exists) by selecting the device on the left-hand side of iTunes (on iTunes 11 you can enable the left-hand sidebar via option-command-S on a Mac, control-S on a PC), and on the Summary tab on the right-hand side clicking the Check For Updates button
Updating to iOS 5+ : http://support.apple.com/kb/HT4972
It will update to the highest iOS version available for it.