How the body responds
What soreness is, and what it is not
Delayed muscle soreness is not lactic acid, not a measure of a good session, and not a reliable signal of anything much.
What people are told
Two things, and both are wrong.
That soreness the day after is caused by lactic acid sitting in the muscle.
And that soreness is a measure of how good the session was — that a workout which does not leave you sore has not achieved anything.
What is actually known
The phenomenon is delayed-onset muscle soreness. It appears roughly a day after unaccustomed exercise, peaks around one to three days later, and resolves on its own.
It is not lactate. Lactate produced during exercise clears from the blood within an hour or so of stopping — long before the soreness arrives. The timing alone rules it out. Lactate is also not a waste product causing damage; it is a fuel that gets used.
What actually produces it is not fully settled, and the honest summary is that it involves microscopic disruption to muscle and connective tissue, an inflammatory response, and sensitisation of the nerve endings in the area. The soreness is a nervous-system output, not a direct readout of tissue damage.
Two observations make the "soreness means progress" idea hard to sustain:
It is driven by novelty more than by effort. A movement you have never done makes you sore. The same movement, at the same effort, six weeks later does not. Nothing about the training got worse.
Lowering under load produces far more of it than lifting does — which is a fact about the type of contraction rather than about how productive the session was.
What follows from that
Do not use soreness to judge a session. It mostly tells you the session was unfamiliar.
Do not chase it. Deliberately seeking soreness means deliberately seeking novelty, which is the opposite of the consistency that actually produces adaptation.
Do not be alarmed by its absence. People who train consistently are often not sore, and are progressing.
Do take note of soreness that is not like the others — very severe, not resolving after several days, or accompanied by significant swelling or dark urine. That is a medical situation and not one this site addresses.
What we still cannot say
The precise mechanism. It is described in terms of microdamage, inflammation and nerve sensitisation, and the relative contribution of each is not settled.
Whether soreness has any relationship to eventual adaptation. The intuition says the two should be connected; the evidence does not support a useful link, and it is genuinely possible to adapt well with very little of it.
Whether any of the popular remedies do much. Stretching, foam rolling, ice baths, massage and compression have all been studied with mixed and generally modest results. Something may help you feel better. Feeling better is a legitimate goal, and it is a different claim from recovering faster.