I know caffeine headaches are caused from an adaptation your body makes after long-term caffeine usage.
Caffein causes vasoconstriction in the cephalic vasculature (opposite of the dilating effects seen elsewhere in the body; periphery) and eventually your body compensates to keep the vasculature at a normal diameter; the diameter the vasculature would normally be without caffeine; it sends less constriction signals to the vasculature.) When the caffeine is abruptly taken out of the diet, the body continues to send less constriction signals than normal to those veins (b/c "reverse adaption" takes time), and as a result, they are more dilated than normal in the absence of caffeine. The vasculature is now more dilated than normal and presses up against surrounding nerves in the area, sending pain signals to the brain. This is why drinking caffeine will make caffeine headaches go away too.
This is how it was explained to me anyways.
I don't know the specific anatomical location of this process... I just know it's up there in the head somewhere, lol.