Contrary to popular belief, lactic acid is not a waste product that "builds up" in the muscles during vigorous exercise, leading to fatigue and stiff, sore muscles. This is a distorted and inaccurate version of the real story.
In truth, the pain comes from a substance called lactate that's involved in muscle function (lactic acid is a different chemical compound that doesn't come into play). Rather than a waste product, lactate is an important step in the production of the energy needed to fuel the muscle. The breakdown of glucose to produce energy creates an acid called pyruvate. Pyruvate eventually turns into lactate, most of which is converted into energy. The rest turns into glycogen, another key element in the muscle-building process.
Problems occur when you exercise a lot and produce too much pyruvate (and lactate) for the body to convert quickly enough [source: Morris]. No one is entirely sure how this causes muscle fatigue during exercise, though one common theory suggests that hydrogen ions released into the bloodstream increase the acidity and leads to fatigue. One thing we do know: Lactate doesn't cause post-exercise soreness. That comes from the muscle damage that naturally results from intense workouts.