The endocannabinoid system is spread throughout your brain and body, but primarily throughout your central nervous system. The interaction between cannabinoids and receptors is what produces effects like the regulation of mood, pain, appetite, inflammation, and memory. Plant-based cannabinoids, found in cannabis plants, also interact with the receptors (whimsically named CB1 and CB2) in the endocannabinoid system, and each affects your body in different ways. CBD and its infamous cousin THC are the 2 most well-known cannabinoids.
Pharmacology published a study in 2016 looking at medical marijuana for migraines, specifically in relation to its effects on serotonin, with very positive results. You’ll notice that neither study looked at CBD in isolation from other cannabinoids (which is an issue with a lot of research on CBD and pain). Truthfully, the research on CBD alone just isn’t sufficient to make any pronouncements about its effects on headache pain.