Does itunes backup your songs?

So let say if i do a system recovery, when you download itunes again does it sync everything in your iphone/ipod once you plug it in your computer? Or do you have to save all the things you have onto a usb?

Backup your iTunes to the iCloud if it's not set to do so automatically, then you can just sign in and access your music.