If and when things fall apart:
Training for endurance events can lead to repetitive stress injuries and, for those interested, a much greater knowledge of how the body works and doesn't work. Here are some methods, ideas, and treatments that have helped me.
Rather obviously, it's best not to get injured in the first place. Strength training, range-of-motion work (stretching is overrated), and smart training are the basics.
Trigger point therapy:
It seems oftentimes the area that hurts is not the problem. A book that has been incredibly helpful to me is Clair Davies book on Trigger Point therapy. It's essentially a reference book: look up the area that's in trouble and work your way down through the possible causes.
Davies's book is a simplified version of Travell and Simons's two volume medical reference Myofascial Pain and Dysfunction: The Trigger Point Manual. The drawings and detail here are wonderful.