Answer:
Endorphins are a reward mechanism inside the brain, by which the brain is signalled that something good has happened that the brain should register a state of pleasure or happiness. They can also act as pain relief, when the body becomes too hurt to handle things.