The training plan you should follow depends upon four factors:
1. The distance of race you are training for eg 5k, 10k or half marathon/marathon.
2. How long you have to build up to your race.
3. How many times a week you wish to run.
4. How long you have been running for.
There are some great detailed training plans available online on sites such as Runners World which you can explore and which cater to all types of runners from complete beginner to seasoned veteran. Below are some basic training plans which will hopefully give you some useful tips. Please bear in mind that you will need to slowly build up to the recommended weekly schedules described:
5k to 10k
For shorter races like these developing your speed endurance is the key. That means plenty of speed sessions each week eg track reps once a week and one threshold run (run slightly slower than race pace) per week. These shorter faster runs should help to increase your VO2 max (the maximum amount of oxygen in millilitres, you can use in one minute per kilogram of body weight) and your lactate threshold (the max speed you can run at before your body starts to develop lactic acid in the muscles). You should still include plenty of slow and steady miles to build basic endurance and aerobic fitness. Your longest run does not need to be much more than 10-12 miles and a total weekly mileage of 25-40 miles should produce excellent results.
Half Marathon
The same principles apply to half marathon training as they do to the 5k/10k plans but the key point here is that you need to focus a bit more on endurance. You should still include a couple of faster sessions per week (remember your half marathon pace shouldn't be much more than 30 secs per mile slower than your 10k pace) but you need to start buidling your mileage up on your other slow/steady runs. Your longest weekly run should now be in the region of 14 miles. Total weekly mileage should be in the 35-50 mile range.
Marathon
26.2 miles is an awfully long way and training for the marathon needs very careful preparation. Your body can only store enough glycogen in its muscles to allow you to run for about 2 hours so unless you are planning on breaking the world record you will need to carefully train your body to store extra glycogen and to burn fat. There should be a few faster sessions, maybe still continue with a weekly track session, but even here the emphasis should be on distance over speed eg rather than 6 x 800 metre reps at your 5k race pace swap this for 4 x 1 mile at your 10k race pace. Longest runs should build up to the 20-22 mile range and it is a good idea to experiment with hydration, energy gels on these. Avoid too many energy gel fueled runs though as the aim of your long runs is to train your body to cope with depleted muscle glycogen stores which won't happen if you chomp down 5 carbo gels every time! Aim for a total weekly distance of at least 40-45 miles up to 60 or 70. Ensure you throw in some lower mileage weeks and also plenty of varied running (off road, hills etc) as this will help you avoid injuries.
GOOD LUCK AND ENJOY YOUR RUNNING!

