When you get a headache, your brain itself isn’t feeling pain. It has no pain receptors. Instead, a network of nerves surrounding your brain detects irritation in nearby tissues, blood vessels, and muscles, then floods your brain with pain signals. About 40% of the global population experiences headache disorders, making this one of the most common neurological events humans go through. What’s happening beneath the surface depends on the type of headache, but the core story is the same: something triggers your nervous system to sound an alarm, and your brain interprets that alarm as pain.
The Nerve System Behind the Pain
The main player in most headaches is the trigeminal nerve, a large nerve that branches across your face, scalp, and the lining of your brain. Its fibers wrap around pain-sensitive structures inside your skull: the protective membrane covering your brain (called the dura), large blood vessels on the brain’s surface, and the venous channels that drain blood from your head. These fibers are mostly unmyelinated, meaning they lack the insulating coating that speeds up nerve signals, so they transmit a slower, duller, more persistent type of pain rather than the sharp, quick kind you feel from a paper cut.
When something irritates these structures, the trigeminal nerve fibers fire and send signals to a relay station where the upper spinal cord meets the brainstem. From there, second-order neurons carry the message up to higher brain regions that register the sensation as pain. This relay station also receives input from nerves in your upper neck, which is why headaches and neck stiffness so often go together.
What Happens in a Tension Headache
Tension-type headaches are the most common variety. In some populations, more than 70% of people report them. They feel like a band of pressure squeezing around your head, and the mechanism starts in the muscles and connective tissues of your scalp, jaw, and neck. Research consistently shows that these pericranial tissues (the muscles and fascia surrounding your skull) are significantly more tender in people with tension headaches than in people without them, and that tenderness tracks closely with both pain intensity and headache frequency.
The current understanding is that stressed, tight, or overworked muscles release inflammatory chemicals that excite the nerve endings embedded in those tissues. Those nerve endings become sensitized, meaning they start responding to stimuli that wouldn’t normally register as painful. A level of muscle tension that you’d usually ignore begins producing genuine pain signals.
For people who get tension headaches frequently, something more concerning develops. The constant stream of pain signals from those sensitized muscles eventually changes the way the central nervous system processes pain. Neurons in the brainstem relay station become hypersensitive on their own, amplifying incoming signals. This central sensitization can also loop back to the muscles themselves, slightly increasing muscle activity and stiffness, which feeds more pain signals into the already-sensitized system. This feedback loop helps explain why occasional tension headaches can gradually become chronic ones.
What Happens in a Migraine
Migraines involve a more complex cascade. The headache phase is driven by activation of the same trigeminal nerve pathways, but the process starts differently and produces a wider range of symptoms. When the trigeminal system fires during a migraine, nerve endings release a signaling molecule called CGRP (calcitonin gene-related peptide). CGRP causes blood vessels around the brain to dilate and become inflamed, which further stimulates the surrounding nerve fibers, creating a self-reinforcing cycle of inflammation and pain.
CGRP levels are elevated in people with migraines even between attacks, and interestingly, people whose tension-type headaches have a throbbing or pulsating quality also show elevated CGRP levels. This suggests that throbbing headaches of any label may share some of the same underlying biology as migraines, blurring the line between headache types more than the categories imply.
Why Light and Sound Become Unbearable
If you’ve ever needed to lie in a dark, quiet room during a headache, that’s not just preference. It’s a measurable change in how your brain processes sensory input. During a headache, the brainstem systems that normally filter and moderate incoming signals from your eyes and ears begin to malfunction. Signals that your brain would ordinarily handle without issue, like normal room lighting or background conversation, get amplified and interpreted as painful or overwhelming. This sensitivity to light and sound often begins before the pain itself starts, during the earliest phase of the attack, and can linger after the pain resolves.
The Phases Before and After Pain
A migraine isn’t just a headache. It unfolds in stages, and the pain phase is only one part. The first stage, called prodrome, can begin hours or even days before the headache arrives. During prodrome, you might notice mood changes like irritability or difficulty focusing, unusual fatigue, neck stiffness, nausea, or digestive changes. Some symptoms are surprisingly specific: excessive yawning, cravings for particular foods, and frequent urination are hallmarks of this early phase.
After the pain subsides, roughly 80% of people with migraines experience a postdrome phase, sometimes called the “migraine hangover.” This brings fatigue, body aches, difficulty concentrating, dizziness, and lingering light sensitivity. It can last a day or more, and for many people it’s nearly as disruptive as the headache itself. Understanding these phases matters practically: if you recognize prodrome symptoms, you can treat the headache earlier, when intervention tends to be more effective.
How Pain Relievers Interrupt the Process
Common over-the-counter painkillers like ibuprofen and aspirin work by blocking the production of inflammatory chemicals at the site of irritation. They reduce the inflammation around nerve endings in muscles and blood vessels, which quiets the pain signals being sent to the brain. This approach works for most tension headaches and mild migraines because it targets the peripheral inflammation driving the pain.
For migraines that don’t respond to standard painkillers, prescription medications called triptans take a different approach. They mimic the action of serotonin, binding to specific receptors on blood vessels and nerve endings. This constricts the dilated blood vessels and directly reduces the release of CGRP and other inflammatory signals from the trigeminal nerve. Newer medications target CGRP itself, either blocking the molecule or blocking the receptor it binds to, which interrupts the migraine cycle at one of its key points.
When a Headache Signals Something Serious
The vast majority of headaches are “primary,” meaning the headache itself is the condition, not a symptom of something else. But certain patterns point to secondary headaches, where the pain is a warning sign of an underlying problem. Clinicians use a set of red flags to identify these situations, and knowing them is useful.
The most urgent is sudden onset. A headache that reaches maximum intensity within seconds, sometimes called a thunderclap headache, can indicate a vascular emergency like a ruptured aneurysm and needs immediate evaluation. Other red flags include neurological symptoms you don’t normally experience, such as new weakness in an arm or leg, unusual numbness, or vision changes. Headaches accompanied by fever, night sweats, or other signs of systemic illness also warrant attention.
A new headache pattern appearing for the first time after age 50 is more likely to have a secondary cause. Headaches that clearly worsen over weeks or months in severity or frequency, or that change dramatically with body position (going from standing to lying down, for instance) or with coughing and straining, can point to pressure changes inside the skull. New headaches during or shortly after pregnancy should also be evaluated, as they can reflect vascular or hormonal complications specific to that period.

