I've had my iPhone 4 for about 3 months and when I connected it to my computer today I was prompted to update the iOS, so I did. But somehow I didn't realise that it meant I was going to need some kind of password once the update had been downloaded etc... having failed to remember it after a few attempts I simply left iTunes to get some troubleshooting advice. When I got back it seems that the password prompt had disappeared and my phone seems to be back to its original settings.
How can I restore the data that was on the phone?