The exact cause of the soreness is unknown, but there are three key ways to prevent it: 1) Avoiding sudden upswings in training intensity or quantity; 2) Maintaining good muscle flexibility; and 3) Periodically forcing your muscles to complete increased amounts of eccentric' work.
Although eccentric contractions themselves can initially produce muscle soreness, a single bout of eccentric exercise will often inoculate muscles against pain for several weeks. It's not clear why eccentric training has this protective effect but it's possible that an eccentric workout 'teaches' the nervous system to redistribute potentially damaging forces over a larger number of fibres within a muscle, lessening the stress and strain on individual muscle cells. Alternatively, an eccentric workout may destroy the weakest fibres in a muscle, which are subsequently replaced by more resilient cells.
Fortunately, workouts which emphasise eccentric contractions are easy to carry out, and - in addition to providing immunity to muscle soreness - they usually improve an athlete's coordination and muscle power too! Good examples of eccentric workouts would be running downhill for 10-15 minutes (watch out! The first time you do this, you may get very sore), bounding up hills with exaggerated knee lifts, or the more traditional plyometric exercises, which include: