"When soft tissue is healing, the new tissue needs to be educated on its job. The overall process of getting a soft-tissue injury successfully back to competition involves 25% treatment and 75% rehabilitation process."
-Jec Aristotle Ballou
How muscle spasm and pain develops
Muscle stress associated with vigorous exercise is necessary and beneficial to help muscle grow and maintain healthy function. However, when a muscle is pushed beyond its capability, a spasm causing the muscle to get stuck in partial contraction will occur and the pain cycle begins.
Relationship between the horse's hoof and pain in the body
The horse carries approximately 65% of its weight on the front feet. When the body muscles become tense and rigid, they not only provide less power, but provide less suspension and cushion for the lower limbs and feet. This can put more stress on the feet and legs, which causes tense and rigid muscles, which cause more pain in the body, and so on down the line. The same applies to the hind feet.
Fascia and Emotional Retention
Excerpt from Equine Massage: A Practical Guide by Jean-Pierre Hourdebaight
It is theorized the energy created by life stress, trauma, or anxiety converts into fascial restriction. At both a conscious and subconscious level, the body records the episode as a physical sensation (pain!), an emotional sensation (I don't like it!), and an intellectual awareness (stay away!).
Even after the experience has passed and the body heals, the fascia tissue retains the emotional and intellectual connection. This coding of traumatic experience is termed "emotional memory" or tissue memory." While the horse might never forget a particular incident, over the course of several myofascial release sessions, he will be able to let go of the associated fear and reactive anxiety.
Recommended books regarding massage, anatomy, and biomechanics
Equine Massage
The Basic Principles of Equine Massage/Muscle Therapy, Revised Edition by Mike Scott
Equine Anatomy
Equine Biomechanics