Defined by researchers as a looped segment of music usually about 20 seconds long that suddenly plays in our heads without any conscious effort, an earworm can last for hours, days, or even, in extreme cases, months.