While the other answers mention several possible causes, they fail to address why. So I'm going to add my 2 cents here as well, which I'll base mainly on the results of the phd-thesis from Tine Willems from the university of Ghent (Belgium), which focused on the intrinsic risk factors for exercise related lower leg pain and Murphy et al. in a study about risk factors for lower extremity injury.
The first thing you must understand about injuries, is that there are many possible causes and they all interact with each other, so it can be difficult to prevent any form injury. You can get an injury from either a single overload, that exceeds a tissue's maximum tolerance (trauma) or from repeatedly overloading, which causes an overuse injury. As you're most likely to sustain an injury in your weakest link, you want to prevent overloading it.
The factors that might cause this are divided in extrinsic and intrinsic risk factors. Amongst the extrinsic risk factors we count things like:
- poor quality shoes, because their material properties aren't constant, they can load your joints in unexpected or simply the wrong ways.
- hard underground surfaces, if you're an inexperienced runner, you'll probably have a poor technique as well. Especially in heavier runners, this means that when they land, they insufficiently dampen the impact by flexing all the joint. Instead, they land with a hard impact, which overloads the muscles/soft tissue around the ankle that have to bear the load.
- exercise load, doing running as a cardio exercise is done at lower speeds and thus require less forces. Whereas, when you want to do sprint intervals, you get short intervals of high intensity during which you have very high impact forces. You're more likely to sustain a trauma at higher intensities, because you're body is no longer able to withstand the forces. However, due to various intrinsic factors, exercise load is also a problem in beginning runners, because their body has not yet adapted to the loads of running.
- exercise frequency, if you're already risking overloading your muscles, they need sufficient rest between workouts to fully recover. However, a lot of 'fit' beginners will jump in running head of heels and overdo themselves by not giving their body sufficient rest.
Among the intrinsic risk factors are:
- a lack of running experience, which as notes above can cause overloading, because of wrong foot placement, insufficient dampening of the impact forces and your muscles/tendons aren't adapted to running loads.
- poor aerobic fitness, might cause altered muscle recruitment patterns, which alters the distribution of forces through the muscle-tendon complex. It also has a negative influence on your running technique and causes your body to be less capable to withstand certain loads.
- previous injuries, if you have sustained injuries in the past and possibly rehabilitates insufficiently, you are more likely to sustain new injuries due to lax tendons, muscle strength impairment and imbalance or scar tissue.
There are several others, such as body composition (high BMI), postural stability, anatomical misalignment or a lack of joint flexibility and range of motion. However, the strongest contribution is attributed to an adverse biomechanical running pattern. The most important factors for ankle sprains were: landing too much on the lateral side of the heel, pushing off too medially and too late resupination during the roll off. Most of these will improve when you increase the strength of the muscles around your ankle and improve your rolling off (which requires some experience).
For overuse injuries the most important factor was: increased inversion (of the foot/ankle) and increase loading under the medial side of the foot. This is normally called (over)pronation, which has several negative influences. Amongst them are rotational strain on the shank, increased strain on the soft tissue and stabilizing muscles. Another risk factor was a more forward position of the COP at first foot contact, which indicates a lack of the early pronation that's required to absorb the impact forces, so this takes place further ahead in the roll off in an exeggerated form. However, while too much or too late pronation is considered a problem, the exact opposite isn't good as well. All these movements can come from a lack of muscle strength, poor control of the muscles and technique or the wrong footwear.
So what can you do?
Try to manage your extrinsic factors: so get the right shoes, try to workout on software undergrounds, use a training program or join an athletics club, that helps you rate limit your workout frequency and intensity and also ensures sufficient rest.
You'd need a checkup to see whether some of the intrinsic risk factors apply to you or not. However in all cases what you yourself can do is: make sure you get in a decent shape before you increase your pace; a decent aerobic capacity doesn't guarantee you're adapted to running. If you have a history of injuries, make sure you do additional exercises to strengthen this area. Doing yoga is a great exercise, because it mixes stabilizing joints with increasing the range of motion.