Why do songs get stuck in your head?
The Real Answer
There is no single cause that explains every song that gets stuck in someone’s head. Researchers call the experience involuntary musical imagery: a fragment of music comes to mind and repeats without a deliberate decision to play it mentally.
Recent exposure to a song, familiarity, memory associations, mind-wandering or low-demand moments, and particular melodic features can all make an earworm more likely. Research also finds large individual and situational differences, which is why the same chorus can loop for one person and leave another person alone.
The useful answer is therefore not that your brain simply “likes repetition.” Earworms sit at the intersection of memory, attention, musical structure, and whatever cues happened to make that particular fragment easy to retrieve again.
A song gets stuck in your head and your first solution is to play the song again, giving the thing you are trying to stop a full three-minute performance. You finish the track, feel cured for twelve seconds, then catch yourself humming the chorus while brushing your teeth.
Why People Ask This
People ask because the experience feels involuntary but highly specific. The song is usually not playing, the person may not even want to hear it, and yet a small fragment can keep returning with enough clarity that it feels as though the brain started a playlist without asking.