I take it you have an Apple ID on iTunes? What you will need to do is sync your device to your computer. This will also update the hardware, and sync all your data on your iPhone which you have downloaded and purchased on to your iTunes account. You can also perform a backup of your iPhone which you can then transfer over to another iPhone at a later date, which will contain all your contacts and so on.
Hope this helps