iTunes is Apple's music management software. It should have come with your computer, but in case it has been deleted you can download the latest version here.
When you connect your iPhone to the MacBook, it will appear in iTunes. From there you can manage the music (as well as pictures, movies, applications and podcasts) on your iPhone.
Best of luck.