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 is involved in regulating a variety of 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. The ECS is also involved in mediating some of the physiological and cognitive effects of voluntary physical exercise in humans and other animals, such as contributing to exercise-induced euphoria as well as modulating locomotor activity and motivational salience for rewards. In humans, the plasma concentration of certain endocannabinoids (i.e., anandamide) have been found to rise during physical activity; since endocannabinoids can effectively penetrate the blood–brain barrier, it has been suggested that anandamide, along with other euphoriant neurochemicals, contributes to the development of exercise-induced euphoria in humans, a state colloquially referred to as a runner's high.
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