There are a few ways that you can prevent injuries while exercising.
1) if you haven’t been active in a while, check with your doctor first, and make sure that it is ok for you to be exercising and follow any guidelines from your doctor. This is particularly important if you have any cardiac risk factors such as previous cardio incidents, if you have family history of heart disease, if you are obese, or if you are a smoker.
2) if you are new to exercise, or have been inactive for a while, consult with a fitness professional. They will help you choose the right exercises to get started and will monitor your form. Correct form is critical for injury prevention
3) Always warm up. Cold muscles are more likely to get injured.
4) Protective gear. i.e. If you are a biker, use a helmet (not necessary for stationary bikes), wrist guards for roller bladers.
5) Be aware of your surroundings. Don’t make the volume so high on an mp3 player that you can’t hear the traffic around you, and don’t exercise alone in dark deserted areas.