Hi Lacey, there's a chemical that the brain that releases, called endorphins; which makes us feel pleasure. When you eat, exercise, or hurt yourself, the chemical is released as it is both a giver of pleasure, euphoria, and painkiller. Unfortunately, with any substance we can abuse it, using it as a coping mechanism.
Those who suffer from extreme low self esteem or depression (i.e. bully victims, parental abuse, etc) use food as a coping mechanism. Some also self-harm by cutting themselves. It gives them the feeling and sense of control. Still others use drugs and alcholol to deal with their pain,
All of which are unhealthy and destuctive coping mechanisms which will only harm them in the end.