Tears are our body's reaction to chemicals and hormones we produced. When we are overcome by intense emotions like being upset, our brains and bodies overreact and work overtime by producing chemicals and hormones. Crying helps eliminate these extra chemicals that we don't need.
The excess chemicals and hormones disappear from our body through the form of tears.
As our tears flow, they sooth our sadness or distress by withdrawing these chemical agents. That is why many people feel calmer or more refreshed after crying - because the tears get rid of these hormones that are produced when we are sad, happy, or distressed.