Track intervals accustom you to run your 5K or 10K pace. They improve your leg turnover, build your confidence, and, like tempo runs, help you develop a sense of pace. Early in the season you should be doing longer repeats, such as 1000 meters. As it gets closer to your peak race, they should be shorter, 800s or 400s. Fartlek workouts can be substituted for track intervals, particularly if you have a tendency to get injured when you run on the track. A good fartlek workout is one minute at 5K pace, with a one-minute jog for 24 minutes total, not including your easy warm-up and warm-down.
To run your best 5K and 10K, you must do the work. You need to have a minimum of 30 miles a week for two months before you begin serious training, so prepare yourself for a year's commitment to the training schedule. This does not mean you won't be racing until the end of the year. On the contrary, it means you can race once a month during the 5K/10K season as long as you understand that your focus is on peaking for the final race.
During racing season (usually six months long), you can schedule a 5K or 10K every third or fourth week. Don't concern yourself with time. You want to feel "race fit" for your peak race, so these races will mimic your track intervals or fartlek workouts. You run them to work on your leg turnover and to get a feel for that all important sense of pace. They should never be all out efforts.
Now is the time to choose your goal race and start training. Remember to give yourself a year to improve. Be patient, grow stronger, get faster, and run like the wind.