When you install iTunes on a new computer media will only be available to you automatically if:
- your songs were purchased from the iTunes Store, and/or
- you subscribe to iTunes Match
In the first case, there may be limitations on where you are (not all local versions of the iTunes Store support re-downloading of purchased items) and whether the items concerned are still available for purchase. In both cases you need to be signed into iTunes using the same Apple ID that you used to purchase media and to subscribe to iTunes Match.
In general, though, you need to transfer your library from your old computer to your new one. If you no longer have access to the old computer, and have neglected to keep an up to date backup of it, it may be possible to retrieve media that is on an iPod / iPhone / iPad.