A 2004 paper reviewed the research on massage therapy available at the time and found some interesting things. After one massage session, massage clients show reduced heart rates, blood pressures, cortisol levels (the main stress hormone) and anxiety, and after several sessions, clients showed remarkable drops in depression levels, on par with the positive effects of psychotherapy.
The same paper found that immediately after massage, clients didn’t report drops in their pain levels, but after several sessions, they reported better pain levels. There are a few theories for why this is, with one of the most popular being that massage lowers stress and anxiety, allowing for better sleep and healing during that sleep. Other theories for why massage can help with pain (short or long term) include the gate control theory, that touch, vibration and pressure signals can block pain signals to neurons, and the theory that massage activates the parasympathetic nervous system, which triggers the release of endorphins and hormones that contribute to feelings of wellness.
Medical effects aside, massages just feel nice, and things that make humans happy tend to trigger hormone reactions that propagate those nice feelings. And we mustn’t forget the possible placebo effects of believing massages help us.