(CNN) -

Michael Jackson was on to something when he sang that "A-B-C" is "simple as 'Do Re Mi.'" Music helps kids remember basic facts such as the order of letters in the alphabet, partly because songs tap into fundamental systems in our brains that are sensitive to melody and beat.

That's not all: when you play music, you are exercising your brain in a unique way.

"I think there's enough evidence to say that musical experience, musical exposure, musical training, all of those things change your brain," says Dr. Charles Limb, associate professor of otolaryngology and head and neck surgery at Johns Hopkins University. "It allows you to think in a way that you used to not think, and it also trains a lot of other cognitive facilities that have nothing to do with music."

The connection between music and the brain is the subject of a symposium at the Association for Psychological Science conference in Chicago this weekend, featuring prominent scientists and Grammy-winning bassist Victor Wooten. They will discuss the remarkable ways our brains enable us to appreciate, remember and play music, and how we can harness those abilities in new ways.

There are more facets to the mind-music connection than there are notes in a major scale, but it's fascinating to zoom in on a few to see the extraordinary affects music can have on your brain.

Ear worms

Whether it's "Somewhere Over the Rainbow" or "Someone I Used to Know," or even "Bad Romance" or "Bohemian Rhapsody," it's easy to get part of a song stuck in your head, perhaps even a part that you don't particularly like. It plays over and over on repeat, as if the "loop" button got stuck on your music player.

Scientists think of these annoying sound segments as "ear worms." They don't yet know much about why they happen, but research is making headway on what's going on.

The songs that get stuck in people's heads tend to be melodically and rhythmically simple, says Daniel Levitin, a psychologist who studies the neuroscience of music at McGill University in Montreal, Quebec. It's usually just a segment of the song, not the entire thing from beginning to end. A common method of getting rid of an ear worm is to listen to a different song -- except, of course, that song might plant itself in your thoughts for awhile.

"What we think is going on is that the neural circuits get stuck in a repeating loop and they play this thing over and over again," Levitin said.

In rare cases, ear worms can actually be detrimental to people's everyday functioning, Levitin said. There are people who can't work, sleep or concentrate because of songs that won't leave their heads. They may even need to take the same anti-anxiety medications given to people with obsessive-compulsive disorder, drugs that relax the neural circuits that are stuck in an infinite loop.

How we evolved to remember music

Given how easily song snippets get stuck in our heads, music must be linked to some sort of evolutionary adaptation that helped our ancestors.

Bone flutes have been dated to about 40,000 to 80,000 years ago, so people were at least playing music. Experts assume that people were probably singing before they went to the trouble of fashioning this instrument, Levitin said. In Judaism, the Torah was set to music as a way to remember it before it was written down.

"The structures that respond to music in the brain evolved earlier than the structures that respond to language," Levitin said.

Levitin points out that many of our ancestors, before there was writing, used music to help them remember things, such as how to prepare foods or the way to get to a water source. These procedural tasks would have been easier to remember as songs. Today, we still use songs to teach children things in school, like the 50 states.

What about remembering how to play music?

When you sit down at the piano and learn how to play a song, your brain has to execute what's known as a "motor-action plan." It means that a sequence of events must unfold in a particular order, your fingers must hit a precise pattern of notes in order. And you rehearse those motor movements over and over, strengthening the neural circuits the more you practice.

But musicians who memorize how to play music often find they can't just begin a remembered piece at any point in the song. The brain has a certain number of entry nodes in the motor-action plan, so you can only access the information from particular points in the song.

"Even though it feels like it's in your fingers, it's not," Levitin said. "It's in the finger representation in your head."

Music and pleasure

Music is strongly associated with the brain's reward system. It's the part of the brain that tells us if things are valuable, or important or relevant to survival, said Robert Zatorre, professor of neurology and neurosurgery at Montreal Neurological Institute.

One brain structure in particular, called the striatum, releases a chemical called dopamine in response to pleasure-related stimuli. Imaging of the brain can reveal this process is similar to what happens in your brain in response to food or sex.

But unlike those activities, music doesn't have a direct biological survival value. "It's not obvious that it should engage that same system," Zatorre said.

Musicians can't see inside their own brains, but they're aware of moments of tension and release in pieces, and that's what arrangers of music do.