Is there any free way to get my music from my iPhone to my computer?

Okay so I have had a school laptop for the past 4 years and they constantly get re-imaged and stuff, therefore oftentimes my music is deleted from my computer. I now have a new computer for college and none of my music is on it and all the old free programs now cost money. Please is there any way to get my music from my phone to my computer? I'm trying to get my music off my phone to free up space without losing all of it. Thanks everyone.

Added (1). ITunes does not let you copy music to iTunes unless you bought it from them. I have a lot of music that I have received from friends over the years that I can't copy.

Does the iPhone have an SD card slot? Do you have it connected to cloud storage? Do you have the cable to connect to your computer?

The iPhone is probably THE pickiest OS to work with.
No SD slot. Your best bet is to download iTunes and use your USB cord to move them that way.
And get ready to jailbreak your phone or pay $.99 a song.

I suggest an Android for free music!