The short answer

Songs get stuck in your head when a short musical fragment repeats as an involuntary “earworm.” Hearing the song recently, encountering a cue that reminds you of it, and a memorable tune structure can all contribute. The experience is common and usually fades, but researchers still do not have one complete explanation for why a particular tune loops.

The brain replays a familiar fragment

An earworm is a tune or musical snippet that comes to mind without a deliberate decision to play it. The fragment may repeat with lyrics or melody, often after someone has recently heard the song. A review in Psychology of Music describes earworms as a recurring everyday experience and notes that the mechanisms remain under discussion. [1]

Recent exposure and musical shape can matter

Research summarized by the American Psychological Association found that common earworms often have familiar, easy-to-follow melodies with distinctive intervals or repeated notes. A word, place, or activity can also remind someone of a song and bring it back. These are tendencies from studies, not a formula that predicts which song will get stuck for every listener. [2]

Usually harmless, and not fully explained

Earworms are different from hearing an external sound: the music is generated in the mind. They often disappear on their own. Researchers have tested ideas about memory, attention, and unfinished musical phrases, but no single account explains every episode or every listener.

Earworms and other music sensations

A song fragment can return because a recent sound, phrase, or memory cues it. The tune’s structure may make it easy to repeat mentally, but a catchy song is not guaranteed to become an earworm for everyone who hears it.

Music can also produce physical reactions. See why music can give some people goosebumps; that response involves emotion and bodily sensation, which is a different effect from a tune repeating in memory.

Sources and evidence

  1. Psychology of Music — Why do songs get “stuck in our heads”? ↗

    Review of earworm research and limits of current explanations.

  2. American Psychological Association — Psychologists identify key characteristics of earworms ↗

    Research findings about musical features associated with earworms.

Sources consulted: 15 October 2026. Written with AI assistance and checked against the linked references; not independently reviewed by a subject specialist. Sources do not endorse this article. See our editorial policy.

Revision: Initial publication; the explanation was checked against the linked institutional and research sources, with uncertainty stated where relevant.