The best way to avoid injury
If you are worried about getting hurt, or you have had an injury in the past and you want to make sure you don't re-injure it, there are usually ways to do this. All injuries are different, and unique to the individual. There is no one way to fix all the injuries that are out there other than healing time (assuming the injury can heal). There are however some strategies to help with general injury prevention.
As far as working out, the main thing to target is the muscles around the area of weakness or past injury. For example, building up some strength in your hamstring and calf if your knee isn't feeling up to par. If you have shoulder issues, build up the core and back muscles to help support it.
Of course, we need to take things slow, and pay attention to how everything feels during and after exercise. As I often say, listen to your body! If things start to feel tight or bothering you I would stop, even if it isn't serious pain. Try working on different parts of the body, or sometimes the best thing to do is just stretch and roll out.
The most important factor however, and probably the reason you have issues in the first place, is proper form and muscle activation during exercise or any kind of movement. Doing exercise of any kind improperly puts you at the most risk for injury, weather injury prone or not. So make sure what you're doing is correct. This is where a personal trainer comes in, or doing some of your own research to find out how to exercise properly. Along with my upcoming book I will be releasing a visual exercise guide with all the basic "must know" exercises and visuals and highlighting key parts.
If you're ready to change the way you look at fitness, diet, and lifestyle, order the ebook Inside the Mind of a Personal Trainer here.