Headaches happen when pain-sensitive structures in and around your brain get irritated, stretched, compressed, or inflamed. The brain tissue itself has no pain receptors, but the blood vessels lining its surface, the membranes wrapping around it, and the muscles and nerves in your head and neck are all packed with them. When something activates those nerve endings, they send pain signals through a network centered on the trigeminal nerve, the main sensory nerve of the face and head, which relays the message to your brainstem and then up to higher brain centers where you actually feel the pain. About 65% of adults worldwide experience at least one headache episode per year, making it one of the most common medical complaints on the planet.
The Pain Signaling System in Your Head
The key player in most headaches is a network connecting the trigeminal nerve to the blood vessels inside your skull. Thin nerve fibers, many of them unmyelinated (meaning they lack the insulating sheath that speeds up signals), run along the blood vessels and membranes surrounding the brain. These fibers carry pain-signaling chemicals, most notably one called CGRP, the most potent vessel-widening peptide known in the body.
When these nerve endings are activated, they release CGRP and other signaling molecules that dilate nearby blood vessels and trigger local inflammation: vessels leak fluid, immune cells called mast cells dump their contents, and the area becomes swollen and sensitized. That inflammation further excites the nerve fibers, which release more CGRP, creating a self-reinforcing cycle. This feedback loop can sustain pain for hours to days, which is why some headaches linger far longer than whatever originally triggered them.
The pain signals travel from the trigeminal nerve into the brainstem and upper spinal cord (roughly the top three vertebrae of the neck), which is why headaches often involve pain in the back of the head and upper neck, not just the forehead or temples.
Tension Headaches: The Most Common Type
Tension-type headaches feel like a band of pressure squeezing around your head. They’re the most frequently experienced headache, and they arise from a combination of tight muscles and an overly sensitive nervous system. Stress and poor posture are the two biggest triggers, with disturbed sleep close behind.
The mechanism works like this: when you hunch over a screen or hold your neck in a strained position, the muscles at the base of your skull and along your upper neck tighten. That tightening pulls on connective tissue bridges that attach directly to the membrane lining the inside of your skull, which is rich in pain receptors. The sustained muscle contraction can also reduce blood flow locally, causing the release of pain-signaling chemicals that irritate nerve endings further.
Over time, specific spots in the muscles of the head and neck, called trigger points, can develop. These are tight, tender knots that either radiate pain constantly or flare up when pressed. In people who get tension headaches only occasionally, the problem is mostly peripheral: their muscles are tense and their local nerve endings are firing. But in people who have them chronically (15 or more days per month), the central nervous system itself becomes sensitized, meaning the brain’s pain-processing circuits start amplifying signals that wouldn’t normally register as painful. This shift from a muscle problem to a brain-wiring problem helps explain why chronic tension headaches are so much harder to treat than occasional ones.
How Migraines Develop
Migraines involve a more complex cascade. Many begin with a wave of electrical activity that slowly sweeps across the surface of the brain at a speed of about 2 to 6 millimeters per minute. This wave, called cortical spreading depolarization, is essentially a surge of brain cell activation followed by 15 to 30 minutes of suppressed activity. If you experience visual aura before a migraine (zigzag lines, blind spots, shimmering), that’s this wave passing through your visual processing area.
As the wave moves, it forces brain cells and blood vessels to release a flood of signaling molecules: potassium, hydrogen ions, ATP, glutamate, nitric oxide, and CGRP. These chemicals diffuse to the brain’s surface, where they activate the pain-sensing nerve endings embedded in the membranes and vessel walls. The result is neurogenic inflammation, the same vessel dilation and fluid leakage described above, but on a larger and more sustained scale.
The self-reinforcing nature of this process is what gives migraines their duration. The inflammation stimulates more CGRP release, which increases inflammation, which stimulates more CGRP release. This cycle can sustain itself for 4 to 72 hours, the typical range of a migraine episode. It also explains the throbbing quality: each heartbeat pushes blood through inflamed, dilated vessels, and the stretched vessel walls activate the sensitized nerve endings rhythmically.
Cluster Headaches and Your Internal Clock
Cluster headaches are rarer but extraordinarily intense, often described as the worst pain a person can experience. They strike in bouts (clusters) that last weeks or months, then disappear, sometimes for years. What makes them unique is their precise timing: attacks tend to hit at the same time each day, frequently in the early hours of the morning.
This clockwork pattern points to the hypothalamus, a small region deep in the brain that acts as your master biological clock. The specific structure responsible, the suprachiasmatic nucleus, sits in the front of the hypothalamus and synchronizes your body’s circadian rhythms based on light exposure. It connects directly to the pineal gland (which releases melatonin), the autonomic nervous system (which controls involuntary functions like pupil size and tear production), and the pituitary gland.
In people with cluster headaches, researchers have found altered levels of several chemicals produced by or regulated through this clock system, including melatonin and certain pituitary hormones. Changes in the expression of core circadian genes have also been documented. The autonomic connections explain the distinctive symptoms that accompany a cluster attack: a drooping eyelid, tearing eye, and stuffy or runny nostril, always on the same side as the headache.
Common Everyday Triggers
Many headaches aren’t migraines or cluster headaches. They’re your body’s response to something it needs or something it’s adjusting to.
Dehydration is one of the most straightforward triggers. When your body loses enough fluid, brain tissue actually shrinks slightly, and the volume of the fluid-filled spaces inside the brain increases. That shrinkage tugs on the membranes anchoring the brain to the skull, activating pain receptors. This is also the mechanism behind many hangover headaches, since alcohol is a potent diuretic.
Caffeine withdrawal works through a different pathway. Caffeine blocks receptors for a molecule called adenosine, which naturally promotes relaxation and widens blood vessels. If you drink caffeine regularly, your brain compensates by building more adenosine receptors. When you skip your usual coffee, all those extra receptors are suddenly exposed to normal adenosine levels, which now have an outsized effect. Blood vessels in the brain dilate, cerebral blood flow increases, and you get a headache along with fatigue and drowsiness. This can happen after as little as 12 to 24 hours without caffeine.
Other common triggers include skipped meals (which cause blood sugar drops that affect brain function), bright or flickering lights, strong smells, changes in weather or barometric pressure, and hormonal shifts during the menstrual cycle.
When a Headache Signals Something Else
Most headaches are primary headaches, meaning the headache itself is the condition. But secondary headaches are symptoms of an underlying problem, and some of those problems are serious. Sinus infections cause headaches through inflammation and pressure buildup in the air-filled cavities behind your face. Increased pressure inside the skull, from causes ranging from fluid buildup to tumors to bleeding, compresses pain-sensitive structures and produces headaches that are typically worse when lying down or first thing in the morning.
Neurologists use a set of red flags to identify headaches that warrant urgent evaluation. The key warning signs include: a sudden, explosive headache that reaches maximum intensity within seconds (sometimes called a thunderclap headache), a headache that comes with neurological symptoms like weakness, vision loss, confusion, or difficulty speaking, a new type of headache starting after age 40, headaches accompanied by fever, stiff neck, or rash, and any significant change in a longstanding headache pattern. A first-time headache developing after age 50 with scalp tenderness can signal inflammation of the temporal arteries, which requires rapid treatment to prevent vision loss.
The vast majority of headaches, even severe ones, fall into the primary category and resolve on their own or with standard treatment. But a headache that is sudden, new, different, or accompanied by other symptoms is worth taking seriously and getting evaluated promptly.

