For a very long time, scientists have maintained that the cerebellum or "reptile brain" controls body movements and functions, but nothing beyond that. Nothing sophisticated or analytical or emotional.
However, neuroscientist (and former record producer!) Daniel Levitin noticed something interesting while examining the brain scans of people listening to music they liked (as opposed to random sounds, or music they didn't like): there was activity in the cerebellum.
Farhad Manjoo writes in this story at Salon.com:
Contrary to long-held assumptions, the cerebellum did turn out to play a role in some emotions -- particularly the way we derive pleasure from the rhythm, or groove, of a piece of music. When we listen to a song, our ears send signals not only to the auditory cortex, the region of the brain that processes the sound, but also straight to the cerebellum. When a song begins, Levitin says, the cerebellum, which keeps time in the brain, "synchronizes" itself to the beat. Part of the pleasure we find in music is the result of something like a guessing game that the brain then plays with itself as the beat continues. The cerebellum attempts to predict where beats will occur. Music sounds exciting when our brains guess the right beat, but a song becomes really interesting when it violates the expectation in some surprising way -- what Levitin calls "a sort of musical joke that we're all in on." Music, Levitin writes, "breathes, speeds up, and slows down just as the real world does, and our cerebellum finds pleasure in adjusting itself to stay synchronized."
The article goes on to describe how music also hits other parts of our brains, including a system that's essentially the neural candy store - shooting happy chemicals out into our bodies.
Levitin also touches on the phenomenon of the "ear worm" - the song (or more likely, snippet of a song) that gets stuckstuckstuck in your head. My all-time worst ear worm is "Little Girls" from Annie. I used to hear it in my head constantly whenever I rode my mountain bike up a particularly challenging path. Eventually I had to quit riding my bike.