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, 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, appetite, pain-sensation, mood, and memory, and in mediating the pharmacological effects of cannabis.
Two primary endocannabinoid 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 endocannabinoid ligand (binding molecule), anandamide, as well as its mimetic phytocannabinoid, THC. One other main endocannabinoid is 2-arachidonoylglycerol (2-AG) which is active at both cannabinoid receptors, along with its own mimetic phytocannabinoid, CBD. 2-AG and CBD are involved in the regulation of appetite, immune system functions and pain management.Read more