(CNN) In 2009, Lady Gaga sang about being caught in a bad romance, and people the world over were, almost instantly, able to sing along.

Even now, seven years later, the odds are pretty good that her love woes are already playing on loop in your mind, based solely on the fact that you just read something about it.

"Rah-rah ah-ah-ah." Just in case you weren't there yet.

"Bad Romance" and many songs like it are well-known to musical experts as "earworms," due to their ability to stick inside your brain, on repeat, long after you've heard them. But a new study, published in the journal Psychology of Aesthetics, Creativity and the Arts , now has some insight into why this happens.

"We were interested because it's such a common phenomenon. ... People say certain songs are more catchy than others, but there wasn't a lot of scientific evidence on (this) topic," said Kelly Jakubowski, a music psychologist at Durham University in the UK who herself gets earworms all the time.

It's estimated that 90% of us experience an earworm at least once a week, with some having them even more frequently than others. Jakubowski's team identified three main reasons why they occur, and it comes down to pace, the shape of the melody and a few unique intervals that make a song stand out.

"These three factors stood out above the rest ... (the songs) need to be not too simple and not too complex," Jakubowski said. "None of these have been revealed in previous research."

Making simple yet complex music

As for pace, the earworms highlighted in the study were faster and more upbeat in tempo and generally had a rhythm that people could move to. "We have a propensity to move to earworms," Jakubowski said, citing songs that people may use to pace themselves during a run.

Next on the list was musical shape or contour, with earworms generally being simple in structure, but with a rhythmic pattern. Sounds may rise in pitch, go back down low and then rise again as a pattern, such as "Twinkle, Twinkle, Little Star." Many nursery rhymes fit this pattern to help children remember them -- so their creators knew what they were doing.

"The quite simple melodic contour might help the brain to recall these things," said Jakubowski.

Last was the need for some unusual intervals within the song, just enough to add some catchy surprises while maintaining a simple, uniform pattern overall. "Although the overall melody has a simple shape, you'll find some unique intervals," Jakubowski said. "So it's simple but different."

The findings are much anticipated by neuroscientists and musicians alike.

"This is a timely and well-conducted study that adds to our knowledge of what kinds of music become earworms," said neuroscientist and musician Daniel Levitin , professor of psychology and behavioral neuroscience at McGill University in Canada, who was not involved in the research. "The reason that we get earworms in the first place is probably because music is an evolutionary adaptation, helping us to preserve factual and emotional information in an easily memorizable medium."

Topping the list

To find out what makes certain song catchier than others, the researchers used an online survey to ask 3,000 people, mostly from the UK, between 2010 and 2013 to name their most frequent earworms. The songs most commonly listed as earworms were compared against other songs by the same artists that had ranked similarly on the UK music chart to look for differences in their musical structure.

Now, prepare your mind for an invasion of worms. Here are the top nine songs named in the surveys, with Lady Gaga dominating:

"Bad Romance," Lady Gaga "Can't Get You Out Of My Head," Kylie Minogue "Don't Stop Believin'," Journey "Somebody That I Used To Know," Gotye "Moves Like Jagger," Maroon 5 "California Gurls," Katy Perry "Bohemian Rhapsody," Queen "Alejandro," Lady Gaga "Poker Face" Lady Gaga

"I keep getting 'Bad Romance' in my head," said Jakubowski, who now hears the song in her head every time she just looks at the list above.

Could earworms be useful?

The team believes that in addition to simply understanding how and why this common phenomenon happens, understanding how earworms affect our brains could add insight into how we process memories and moods, as earworms are also known to be linked to memories and to perk people up.

Memories can trigger an earworm, even if you haven't heard it recently, if you are with a person or in a place that you associate with a certain song. "It's memory association," Jakubowski said.

According to the researchers, two-thirds of earworm episodes are considered to be either neutral or positive by the people experiencing them. "Some people find them helpful ... for various reasons, such as getting things done," she said.

"There are so many cues in our environment," she said.

Deworm yourself

Though two-thirds of us may not find earworms offensive, the reality is that at some point, a song may become annoying, and you'll want it to wiggle out of your head. To enable this, the study has three options: Engage fully with the song by listening to it through to the end, distract yourself with a different song -- though this could just leave you with another to get rid of -- or simply let it run its course and don't think about it, which is easier said than done.

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

"A lot of the time, people get the song stuck because they don't remember how it ends," Jakubowski said, explaining why it could work to listen to a song through to the end.

As for filling your mind with another song, she asked the trial participants to name songs they use to get rid of an earworm. The most common answer was "God Save the Queen," the national anthem of the UK.

Levitin, an expert in the field of earworms, weighed in with his own solutions.

"If you're a musician, play the earworm (this is what Neil Young told me he does)," he wrote in an email to CNN. "Or, if it's really bad, ask your doctor for medication, such as anxiolytics (anti-anxiety drugs)."

Before you reach for the medication, perhaps try the other options first and, if you can remember how it goes, try praising the Queen of England in musical form.