I just got a new iPhone as my old one was broken. My old one was a iPhone 4 and this new is a 4S. Now I purchased songs from on my old phone and when I look at these songs on the iTunes music store it says they are purchased but they are not in my iTunes library, how do I get them there?
The iTunes store has a 'Purchased' section that you can use to view and re-download purchased music.
Open up iTunes on your computer and select iTunes Store in the sidebar. In the iTunes Store homepage, click the Purchased link in the Quick Links box on the right:
Once on the Purchased page, select the Music tab on the left and the 'Not on This Computer' tab on the right. Select All Songs in the list on the left and click the Download All button at the bottom of the page.
Once your downloads finish you should have all your music in your library, ready to be synced to your new iPhone.
On your iPhone, in iTunes.app, on the bottom navigation bar click the button labeled More. There should be a Purchased table cell there. Tap it, then, on the top right side tap where it says "Not on this phone". Now tap on the top right side (again) where it says "Download All". This should initiate a download of all the songs you purchased through iTunes.