if it was backed up(as in you did a full sync with itunes before you upgraded) when you plug your iphone in there will be a menu
(in itunes) asking you to set up your iphone as a new one or as a backup, select the most recent backup. (if you do not have this menu there will be an option to do a full restore and then you will get the menu after you do it ).
If this fails (but you do have the backup) there are ways to extract it into your computer but ill explain this later.