Headaches are caused by signals from pain-sensitive nerves in and around your brain, not by the brain tissue itself. The brain has no pain receptors. Instead, a network of nerves surrounding blood vessels, muscles, and membranes around the skull detects changes in pressure, tension, inflammation, or chemical balance and sends pain signals that you experience as a headache. What triggers those signals varies widely, from muscle tension and dehydration to serious underlying conditions.
Nearly 40% of the world’s population experiences a headache disorder in any given year. Tension-type headaches affect about 25% of people globally, while migraines affect roughly 14%. Understanding the different mechanisms behind headaches helps explain why they feel different, respond to different treatments, and sometimes signal something more serious.
Primary vs. Secondary Headaches
Headaches fall into two broad categories. Primary headaches are the condition itself, not a symptom of something else. Tension-type headaches, migraines, and cluster headaches all belong in this group. They result from dysfunction in the pain-processing systems of the brain and surrounding nerves rather than from structural damage or disease.
Secondary headaches are caused by an underlying condition. The list is long: sinus infections, dental problems, high blood pressure, head injuries, brain tumors, strokes, meningitis, and many others. In these cases, the headache is a warning sign. Treating the underlying problem typically resolves the headache.
How Your Brain Registers Head Pain
The main pain pathway for headaches runs through the trigeminal nerve, which is the largest nerve in your face and head. Its branches thread through the membranes surrounding your brain (the meninges) and wrap around major blood vessels inside the skull. When these nerve fibers detect a threat, whether from inflammation, pressure changes, or chemical irritation, they fire signals down into the brainstem and then up to higher brain regions that process pain, emotion, and sensory information.
These nerve fibers release chemical messengers, most notably a protein called CGRP, that dilate blood vessels and promote inflammation around the brain’s surface. This creates a feedback loop: inflammation activates more nerve fibers, which release more inflammatory chemicals, which intensifies the pain. Many newer migraine medications work by blocking CGRP specifically to interrupt this cycle.
What Causes Tension-Type Headaches
Tension-type headaches produce a dull, pressing sensation on both sides of the head, often described as a tight band. For decades, researchers assumed they came purely from tight muscles in the scalp, neck, and shoulders. The picture is more complicated than that.
People with tension headaches do show increased sensitivity to pressure in the muscles around the skull, and this sensitivity gets worse as headaches become more frequent. But in people with chronic tension headaches (15 or more days per month), the problem appears to originate in the brain’s pain-processing system rather than in the muscles themselves. A built-in pain-dampening mechanism that normally filters out low-level discomfort stops working properly. This means signals that a healthy nervous system would suppress, like mild muscle tension or minor postural strain, get amplified into noticeable pain.
This explains why chronic tension headaches often overlap with conditions like fibromyalgia, which shares the same pattern of the central nervous system overreacting to ordinary physical sensations. Stress, poor sleep, and prolonged postures (like hunching over a screen) are common triggers, but they work by feeding into a sensitized pain system rather than by directly damaging tissue.
What Causes Migraines
Migraines involve a more complex chain of events. They typically affect one side of the head, produce throbbing or pulsating pain, and come with sensitivity to light, sound, or both. Many people also experience nausea.
The process often starts deep in the brain. The hypothalamus, which regulates sleep cycles, hunger, and mood, becomes unusually active in the hours or days before a migraine. This is why many people notice warning signs like food cravings, yawning, irritability, or neck stiffness before the pain begins.
In people who get migraine with aura (visual disturbances, tingling, or speech changes), a slow wave of electrical activity spreads across the surface of the brain. This wave temporarily disrupts normal brain function in its path, producing the aura symptoms, and also triggers the trigeminal pain pathway. The wave causes brain cells to release potassium, ATP, and other molecules that activate the surrounding pain-sensitive nerves, kicking off the inflammatory cascade that produces the headache itself.
Migraine triggers vary from person to person but commonly include hormonal shifts (especially drops in estrogen around menstruation), alcohol, certain foods, changes in sleep patterns, weather changes, and stress. These triggers likely work by pushing an already-sensitive brain past its threshold for activating the pain pathway.
Dehydration and Headaches
When your body loses more fluid than it takes in, your brain and surrounding tissues shrink slightly. As brain tissue contracts, it pulls away from the skull, putting traction on the pain-sensitive membranes and nerves that line the inside of your head. This mechanical pulling is what produces the headache.
Dehydration headaches typically affect both sides of the head and worsen with movement, bending over, or walking. They improve with rehydration, though it can take anywhere from 30 minutes to a few hours after drinking water for the pain to resolve. Heat, exercise, alcohol, illness with vomiting or diarrhea, and simply not drinking enough throughout the day are the most common causes.
Caffeine: Both Cause and Cure
Caffeine has an unusual relationship with headaches. In small doses, it narrows blood vessels and can relieve headache pain, which is why it’s an ingredient in some over-the-counter pain relievers. But regular caffeine consumption changes your brain’s chemistry, and stopping abruptly causes a rebound effect.
Caffeine withdrawal headaches typically begin 12 to 24 hours after your last dose, peak between 20 and 51 hours, and can last anywhere from 2 to 9 days. The pain is usually a steady, throbbing ache that affects both sides of the head. Even moderate daily intake (a couple of cups of coffee) is enough to produce withdrawal symptoms if you skip a day. This is one reason some people get headaches every weekend: they sleep later, delay their first cup, and trigger mild withdrawal.
Medication Overuse Headaches
One of the most common and underrecognized headache causes is the very medication used to treat them. Medication overuse headache affects about 2% of the population, making it one of the most widespread drug-induced problems worldwide.
The pattern is straightforward but easy to fall into. You get frequent headaches, so you take pain relievers more often. Over time, your brain adjusts to the presence of the medication, and when it wears off, the headache returns, prompting another dose. The formal threshold is taking acute headache medication on 10 to 15 or more days per month (depending on the type) for at least 3 months. The result is headaches on 15 or more days per month, often daily.
Simple pain relievers, combination analgesics, and triptans can all cause this cycle. Breaking it requires gradually reducing or stopping the overused medication, which usually means a temporary worsening of headaches before improvement.
Other Common Triggers
Several everyday factors cause headaches through distinct mechanisms:
- Poor sleep: Both too little and too much sleep disrupt the brain’s pain-regulating systems. The hypothalamus, which controls your sleep-wake cycle, directly influences the trigeminal pain pathway.
- Alcohol: Alcohol dilates blood vessels, promotes dehydration, and triggers inflammatory responses. The “hangover headache” involves all three mechanisms at once.
- Eyestrain: Prolonged focus on screens or reading causes sustained contraction of muscles around the eyes and forehead, feeding into tension-type headache patterns.
- Skipping meals: Low blood sugar affects the brain’s energy supply and can trigger migraine in susceptible people.
- Weather and altitude: Drops in barometric pressure and reduced oxygen at high altitude both affect intracranial pressure and blood vessel tone.
- Hormonal changes: Fluctuations in estrogen, particularly before menstruation, during pregnancy, or around menopause, are among the strongest migraine triggers.
When a Headache Signals Something Serious
Most headaches are not dangerous, but certain features point to potentially life-threatening causes. A sudden, explosive headache that reaches maximum intensity within seconds, sometimes called a thunderclap headache, can indicate a ruptured blood vessel or aneurysm and needs immediate emergency evaluation.
Other warning signs include headache with fever, stiff neck, confusion, or seizures (which may point to meningitis or encephalitis), headache with new weakness, numbness, or vision changes (suggesting stroke or other vascular problems), and headaches that steadily worsen over days or weeks rather than coming and going. A first-ever severe headache after age 50 is more likely to have a secondary cause, including giant cell arteritis, a condition that can lead to permanent vision loss if untreated.
Headaches that change with body position, getting worse when lying down or standing up, can signal abnormal pressure inside the skull. This includes conditions ranging from a cerebrospinal fluid leak to increased intracranial pressure from a mass or blocked fluid drainage. Headaches triggered by coughing, straining, or exertion deserve attention for the same reason.

