CBD is used to treat chronic pain, insomnia, and anxiety. In a recent study, CBD was discovered to alleviate pain by targeting endocannabinoids involved in mood, memory regulation, and various physiological and cognitive functions.