There are 3 main causes of headaches;
Primary headaches (without underlying cause)
Vascular cluster headaches.
Other rarer pathologies.
Secondary headaches. (with underlying causes)
Linked to associated illnesses or trauma.
Cranial neuralgia and central causes of facial pain.
Trigeminal neuralgia and, more rarely, glossopharyngeal nerve neuralgia.