I very frequently suffer from severe headaches/migraines,and recently became curious about how these ailments were diagnosed, understood, and treated before the development of (broadly speaking) modern medicine.
Classical medical writers understood there were different types of headaches. The basic classifications are picked up by their medieval Persian, Arab, Greek and Latin students, although the names and types can shift rather confusingly.
Aretaeus of Cappadocia in the 1st century AD described three types of headache based on duration and presentation. Cephalalgia are characterized by short duration (defined as "even if it continues for several days"). Chronic headache he calls cephalea or heterocrania based on location in the head. If it's a chronic or recurrent pain that jumps around to different places, cephalea. Oh, but then there is heterocrania:
The pain remains confined to a certain part of the head. Once it has started abruptly, it brings about horrible and terrifying things. The face is distorted spasmodically. The eyes remain glassy and rigid like horns or move to and fro forcedly. The patient is dizzy. He suffers from pain deep in the eyes...His sinews hurt suddenly as if someone has beaten them with a piece of wood. He is nauseous, vomits, the vomit is bilious. He collapses...He moves away from the light, the dark makes the disease less serious. His sense of smell is disturbed. He is weighed down by life, searches for death.
...You were asking about migraines?
In large part through Alexander of Tralles, Aretaeus' classifications are picked up by many Greek and Latin medieval authors. Heterocrania becomes hemicrania, I guess because it is clearer to say "this specific headache is in one place" instead of Aretaeus' "a headache in one place, but it can be in different places in different people".
Alexander is more interested in what causes headaches than Aretaeus was explicitly, although the basics for what caused hemicrania--an excess of bad humors--were apparent in Aretaeus' prescribed treatment if hemicrania grew too terrible and lasted too long. Buckle your seatbelt, because here we go:
Sometimes the pain is mild and the treatment is equally mild. (Really, that's all he says here.)
If the pain lasts and gets worse, bleed 'im! "Incise the vein at the elbow. First, have the patient drink wine for two days." (I think the point is hydration, but, you know.) And this must be accompanied by emptying out phlegm and toxins through existing orifices: "empty out the bowels by a laxative or a clyster." Then "At one time you drive out through the nose with sneezing remedies, at another through the mouth with expectorants."
The next step is to bleed the patient on the forehead.
After that: "Shave off his hair and place a cup at the crown of the head...carry out a good-sized incision at the crown. Incisions that get to the bone are beneficial to hemicrania."
And if that still doesn't work? Well, you might die, but otherwise you get to experience the thrill again. "If the wounds [from the crown incision] have become scars, then cut out the arteries...one is situated behind the ear, clearly pulsating."
Should you be so fortunate as to live during the 12th century, on the other hand, you might find the cures suggested by the Antidotarium Nicolai a bit more palatable. This text, as its name suggests, is a list of mostly herbal or herbal-ish antidotes for various conditions. It links headache with chronic upset stomach (which, by the way, Constantinus Africanus associates with his version of migraine in women, an interesting mention of gendered medicine), epilepsy, leprosy and paralysis as conditions that make it difficult for people to talk.
The Antidotarium prescribes an herbal remedy it calls Yeralogodion memphytum, which is germander, for its two types of headaches: "cephalarcia" and "emigrania."
Cephalarcia is a recognizable corruption of cephalalgia, and I'm sure you can see where this is going: hemicrania thus becomes emigrania--and through French, our modern migraine.
Oh, and medieval headaches were as bad as those of 1st century Cappadocia. Miraculous cures for hemicrania are very fair game in the collections of miracles gathered and submitted for canonization of new saints in the later Middle Ages. And it's the Antidotarium that perhaps says it in the most medieval way possible:
"Those [suffering from headaches] who are so vexed by turmoil in the head that they seem possessed by a demon."
I just read a book (The Technology of Orgasm by Maines) that states headaches were historically believed to be a common symptom of "female hysteria". Hysteria was believed to have various causes at different times in history. Some people thought it was caused by the womb wandering around the body and interfering with other functions, others thought there was a build-up of fluids in it that had to be coaxed out. There were a lot of other crazy theories, too many to mention. A common treatment was to induce "hysterical paroxysm" by pelvic massage, which as described sounds an awful lot like masturbation to orgasm (but doctors assured each other it wasn't because as they all knew, real orgasms could only happen during penetration). Funny enough, for mild headaches, sex or masturbation is still recommended as a treatment option.