How does cannabidiol (CBD) work? That's a somewhat loaded question with a number of possible answers.
To break it down, though, let’s take a look first at what CBD does in the body, and then what it's been shown to help with so far.
To keep it simple:  
RELATED: Five Different Types of CBD
Cannabidiol has been popular, and it is still gaining in popularity as a remedy for a number of health issues.
Research is increasingly demonstrating the same, and rendering CBD into pharmaceutical-grade medicine for a number of serious health conditions is not a far-fetched notion any longer.
As noted by the authors of a recent review:
"There is a growing body of evidence to suggest that cannabinoids are beneficial for a range of clinical conditions, including pain, inflammation, epilepsy, sleep disorders, the symptoms of multiple sclerosis, anorexia, schizophrenia and other conditions. The transformation of cannabinoids from herbal preparations into highly regulated prescription drugs is therefore progressing rapidly." 
So, now that the question: "How does CBD oil work?" has been dealt with—what is CBD good for?
This heading is somewhat misleading because the research is ongoing. CBD has only been fully approved as medicine for one health condition so far, but the rest of the research is promising.
Please note: this list is not exhaustive.
Epileptic Seizures: This one is old news by now, as the U.S. Food and Drug Administration has given the thumbs-up last year to an all-natural CBD medicine for the treatment of intractable epileptic seizures. The indications are specifically for Dravet and Lennox-Gastaut syndromes, and its use is considered safe even for children as young as two years old. 
Pain and Inflammation: According to research and anecdotal evidence, CBD plays an important role in managing pain and inflammation, perhaps even stimulating healing. Research into its exact mechanism of action for these is ongoing, as the cannabinoids (CBD and TCH) seem to work better together than on their own.
As the authors of the aforementioned review explain: 
"Preclinical studies have shown that cannabinoid receptor agonists block pain in various acute and chronic pain models and that inflammation is attenuated...Both CB1 and CB2 receptor agonists demonstrate anti-nociceptive activity, whether used singly or in combination, with CB2 activity believed to affect microglial cells and thereby reduce neuro-inflammatory mechanisms."
Based on what is so far understood about how the cannabinoids work in the body, it appears that THC is responsible for ameliorating pain, and CBD plays a role in managing inflammation while also downregulating THC's less popular effects.
Depression: Research using both animal and human models increasingly demonstrates CBD's potential as an antidepressant or an effective agent in adjunct therapy. In an interview with Agência FAPESP (2018), one Brazilian researcher mentioned that depression treatment with CBD seems to facilitate serotonergic neurotransmission in the central nervous system.
Also that "...combining [CBD] with low doses of selective serotonin reuptake inhibitor antidepressant drugs, or SSRIs, such as fluoxetine induces a significant antidepressant effect."
Other Possible Therapeutic Uses: CBD also shows promise as a treatment for insomnia, anxiety, PTSD, schizophrenia, cardiovascular diseases, and many more. However, well-designed, large-scale research is still lacking to prove its safety and efficacy conclusively for these applications. 
Speaking about safety, though—compared to its more controversial sister, THC, CBD has an excellent safety profile, even according to current research. In one oft-quoted review, the authors conclude:
"In general, the often described favorable safety profile of CBD in humans was confirmed and extended by the reviewed research. The majority of studies were performed for treatment of epilepsy and psychotic disorders. ... In comparison with other drugs, used for the treatment of these medical conditions, CBD has a better side effect profile." 
This is significant, because some medications—especially those for psychotic disorders—are known for bad side effects. Patient adherence to medical treatment is often low.
The authors list the most-reported side effects of CBD as diarrhea, fatigue, and weight or appetite changes.
Its safety even in high doses is reassuring, though, because it means that users can experiment with CBD without needing a prescription.
It is available in many different preparations, and of those, vaping is considered one of the best.
So, how does CBD oil work? Very well, according to thousands of users, and research is slowly but surely echoing this. Never attempt to replace current prescription medication without medical supervision.