Why can't this be simple? (maybe it is and I just don't know). How do we get our songs and iphones to a new computer with a recently downloaded version of itunes?
Whenever I see anyone ask this question, it tells me that they don't back up their files. If you did, you would be able to import your iTunes library from your backup copy. So I'm taking this opportunity to tell you to please, back up your entire hard drive ASAp. No one ever thinks their hard drive will crap out, until it does, and then they're screwed. You can buy an external drive or use an online service, or there may even be some free "cloud" type of thing you can use now. Just get something in place soon, for your own peace of mind. /PSA
Assuming you're looking for all of the songs etc you've downloaded from Apple, log into your iTunes account. Go to the iTunes store. On the right side of the screen, under Quick Links, you'll see 'Purchased' Clicking on this will allow you to download everything you've purchased from iTunes using that account.
If they weren't purchased from iTunes, PPs have some good ideas.
ETA: As someone who's computer has crapped out without backing it up, get an external harddrive. If you've got an apple, get the Timecapsule, because it will automatically back up without you having to do anything besides use your computer.