Contacts are synced with a compatible programme on your computer (Outlook, Windows Contacts, Address book etc) or with a cloud service (iCloud, Yahoo, Google). Sync them back from wherever you were backing them up. If you have not been regularly syncing/backing up your contacts with any of these programmes/cloud service, then they are gone.
If you have managed to create a backup in iTunes at any point before the upgrade, you should be able to get your contacts back. You can restore your phone from a previous backup in iTunes. A 3rd party software would be helpful as well, usually you just need a backup extractor software to extract your contacts from your locally created backup, hopefully you have made one (where you have your contacts).
Having lost over 5 years of contacts when my 'faithful' phone with sim card was stolen, I wanted a way to allow anyone with my mobile number (which is now defunct) to make contact with me. I have a new number now, but no one knows it.
So I built a website, www.renewcontact.com where anyone can register a phone number and have it linked to an active email address.
It means that my old contacts can go there, search for my number and send me an email with their contact details. I can then decide whether I want to respond or not, after all, there will be some contacts whom I don't want to renew contact with.
Anyone in the same situation as I was, may like to go there and register their phone number.
Since I launched it, quite a few have made use of the free service.
Some are also registering really old phone numbers, that have long been dead, hoping I guess that friends from the past will find them and renew contact.
I hope this site is of use to many.