Because the cannabinoids in weed look the same and have the same effect as our own cannabinoids, they attach themselves to the receptors in your brain. Research has shown that there are at least two types of cannabinoids.
CB1 - This is related to memory, learning, reward, pain, anxiety, and control & movements.
CB2 - This is related to our immune system.