Animals naturally produce cannabinoids (called endocannabinoids) that interact with cell receptors throughout our bodies. Endocannabinoids are like a key, receptors are like a lock, and they fit together to produce effects in the body.
The endocannabinoid system (ECS) is involved in many physiological functions, including inflammation, sleep, pain, memory, digestion, immune functions, and neuroprotection.
THC and CBD also interact with the receptors of our ECS. This could partly explain why cannabis has a wide range of effects.