Why do a person's muscles become sore after exercise?
Buildup of Lactic acid in muscle cells.
When doing rigorous exercise, eventually oxygen can't be pumped to a person's muscles fast enough for the muscle cells to properly undergo cellular respiration to create ATP, the muscle cells eventually switch to anaerobic respiration, which doesn't require oxygen.
In anaerobic respiration, only glyolysis can happen so only a net of 2 ATP is created, but since we want to get as much as we can out of glucose, the rest is converted in NADH or FADH for Krebs Cycle and converted into lactic acid (Lactic Acid Fermentation).
This leads to a "sore feeling". A different kind of "sore" which can be confused with this occurs during exercise as well, but this is due to microtears in the muscle tissue when you excersize yourself well.