You can understand the difference between the two with the simplest metaphor:
You are tired after a busy day of work, and finally get off work, feeling very happy, this feeling It's caused by endorphins.
You have been playing for a day and are very happy, but when it is time to go to bed, you are still not satisfied. This feeling is caused by dopamine.
So when exercising long distances, the thing that creates a new sense of pleasure is endorphins.
Extended information:
1. Dopamine: It is a neurotransmitter, a chemical substance used to help cells transmit impulses. This secretion in the brain is related to people's desires and feelings, and it conveys information about excitement and happiness.
2. Endophenolphthalein: It is an endogenous (pituitary gland secreted) morphine-like biochemical synthetic hormone. It is an amino compound (peptide) secreted by the pituitary gland and the hypothalamus of vertebrates. It binds to morphine receptors and produces the same analgesic effects and euphoria as morphine and opiates. Equivalent to a natural analgesic. The use of drugs can increase the secretion of endorphins in the brain.
Reference materials:
Encyclopedia_Dopamine?Baidu Encyclopedia_Endorphins