To understand how CBD works, it helps to first understand a little bit about the human body’s endocannabinoid system.
The endocannabinoid system is a system that every person has, regardless of whether they use cannabis or take cannabinoids. Essentially, it is a system that helps regulate processes related to a variety of activities, such as sleep, mood, appetite, memory, and reproduction. 
This regulation occurs based on interactions between two key endocannabinoids manufactured within the human body (anandamide and 2-arachidonoylglyerol) and cannabinoid receptors, the latter of which are referred to as CB1 receptors and CB2 receptors.
CB1 receptors are located in your central nervous system and the CB2 receptors can be found in your peripheral nervous system (the nervous system which exists outside of your brain and spinal column), which includes the cells in your immune system.When you take CBD, it interacts with these same receptors.