In ancient Greece, headaches were considered powerful afflictions. Victims prayed for relief from Asclepius, the god of medicine. And if pain continued, a medical practitioner would perform  the best-known remedy— drilling a small hole in the skull to drain supposedly infected blood. This dire technique, called trepanation, often replaced the headache  with a more permanent condition. Fortunately, doctors today don’t resort  to power tools to cure headaches. But we still have a lot to learn about this ancient ailment. Today, we’ve classified headaches  into two camps— primary headaches and secondary headaches. The former are not symptomatic of an underlying disease, injury, or condition; they are the condition. But we’ll come back to them in a minute because while primary headaches  account for 50% of reported cases, we actually know much more  about secondary headaches. These are caused by other health problems, with triggers ranging  from dehydration and caffeine withdrawal to head and neck injury, and heart disease. Doctors have classified  over 150 diagnosable types, all with different potential causes,  symptoms, and treatments. But we’ll take just one common case  —a sinus infection—as an example. The sinuses are a system of cavities that spread behind  our foreheads, noses, and upper cheeks. When our sinuses are infected, our immune response heats up the area, roasting the bacteria and inflaming  the cavities well past their usual size. The engorged sinuses put pressure  on the cranial arteries and veins, as well as muscles in the neck and head. Their pain receptors, called nociceptors, trigger in response, cueing the brain to release a flood  of neuropeptides that inflame the cranial blood vessels, swelling and heating up the head. This discomfort,  paired with hyper-sensitive head muscles, creates the sore,  throbbing pain of a headache. Not all headache pain comes from swelling. Tense muscles and inflamed,  sensitive nerves cause varying degrees  of discomfort in each headache. But all cases are reactions  to some cranial irritant. While the cause is clear  in secondary headaches, the origins of primary headaches  remain unknown. Scientists are still investigating  potential triggers for the three types of primary headaches: recurring, long-lasting migraines; intensely painful,  rapid-fire cluster headaches; and, most common of all,  the tension headache. As the name suggests, tension headaches are known for creating  the sensation of a tight band squeezed around the head. These headaches increase the tenderness of the pericranial muscles, which then painfully pulse  with blood and oxygen. Patients report stress, dehydration,  and hormone changes as triggers, but these don’t fit  the symptoms quite right. For example, in dehydration headaches, the frontal lobe actually  shrinks away from the skull, creating forehead swelling that doesn’t match the location  of the pain in tension headaches. Scientists have theories  for what the actual cause is, ranging from spasming blood vessels to overly sensitive nociceptors, but no one knows for sure. Meanwhile, most headache research is focused on more severe primary headaches. Migraines are recurring headaches, which  create a vise-like sensation on the skull that can last from four hours  to three days. In 20% of cases, these attacks are intense enough to overload the brain  with electrical energy, which hyper-excites sensory nerve endings. This produces hallucinations called auras, which can include seeing flashing lights and geometric patterns  and experiencing tingling sensations. Cluster headaches,  another primary headache type, cause burning, stabbing bursts of pain behind one eye, leading to a red eye, constricted pupil,  and drooping eyelid. What can be done about these conditions, which dramatically affect  many people’s quality of life? Tension headaches and most secondary cases can be treated with  over-the-counter pain medications, such as anti-inflammatory drugs  that reduce cranial swelling. And many secondary headache triggers, like dehydration, eye strain, and stress, can be proactively avoided. Migraines and cluster headaches  are more complicated, and we haven’t yet discovered reliable  treatments that work for everyone. But thankfully, pharmacologists  and neurologists are hard at work cracking these pressing mysteries  that weigh so heavily on our minds.