The ECS regulates many systems within the body, and mediates the effects felt by consuming some cannabinoids (like THC).
Summary from Wikipedia:
The endocannabinoid system (ECS) is a biological system composed of endocannabinoids, which are endogenous lipid-based retrograde neurotransmitters that bind to cannabinoid receptors (CBRs), and cannabinoid receptor proteins that are expressed throughout the vertebrate central nervous system (including the brain) and peripheral nervous system. The endocannabinoid system remains under preliminary research, but may be involved in regulating physiological and cognitive processes, including fertility, pregnancy, during pre- and postnatal development, various activity of immune system, appetite, pain-sensation, mood, and memory, and in mediating the pharmacological effects of cannabis.
Two primary cannabinoid receptors have been identified: CB1, first cloned in 1990; and CB2, cloned in 1993. CB1 receptors are found predominantly in the brain and nervous system, as well as in peripheral organs and tissues, and are the main molecular target of the endogenous partial agonist, anandamide (AEA), as well as exogenous THC, the most known active component of cannabis. Endocannabinoid 2-arachidonoylglycerol (2-AG), which is 170-fold more abundant in human brain than AEA, acts as a full agonist at both CBRs. CBD is a phytocannabinoid that acts as a rather weak antagonist at both CBRs and a more potent agonist at TRPV1 and antagonist at TRPM8. It is also known to be a negative allosteric modulator at CB1. THC is desired to be used with CBD in order to counteract the side-effects of the first.Read more