Why bread dough rises (and sometimes doesn't)
Dough rises for one plain reason: yeast eats sugar and breathes out carbon dioxide, and gluten traps the gas in thousands of tiny balloons. Everything else, from kneading to proofing baskets, is about helping those two things meet under the right conditions.
The yeast side
Baker's yeast is a single-celled fungus. Given flour, water and warmth, it breaks starch-derived sugars down and releases carbon dioxide and a little alcohol. It works fastest between 24 and 30 °C. Colder dough still rises, only slowly, which is why an overnight rise in the fridge tastes deeper: the yeast has more time to make flavour than gas.
The gluten side
When wheat flour meets water, two proteins, glutenin and gliadin, link into a stretchy network. Kneading or simply waiting lines that network up. A well developed dough stretches into a thin, light-passing sheet without tearing; that sheet is what holds the gas in.
Three ways to flatten a loaf
Too hot water. Above roughly 50 °C yeast starts to die. Warm to the wrist is plenty.
Too much salt in direct contact. Salt slows yeast down. Mix it into the flour first rather than pouring it onto the yeast.
Over-proofing. If the dough rises far past double, the gluten tires and the bubbles merge and collapse. Press it gently: if the dent springs back slowly, it is ready; if it does not spring back at all, it went too far.