Why lactase declines
Lactose is the main sugar in milk, a disaccharide of glucose and galactose. It is broken down in the small intestine by the enzyme lactase. In most mammals, and in the majority of the world's adult humans, lactase production drops sharply after weaning, a condition called lactase non-persistence. Populations with a long history of dairying, particularly of northern European descent, more often carry genetic variants that keep lactase active into adulthood (lactase persistence).
What happens to undigested lactose
When there is too little lactase, lactose passes undigested into the colon. There it draws water into the gut by osmosis and is fermented by gut bacteria, producing gases such as hydrogen, carbon dioxide, and methane. This is what causes the typical symptoms of bloating, cramping, gas, and loose stools.
The hydrogen breath test, which measures hydrogen after a lactose dose, exploits this fermentation. Lactose intolerance is distinct from a milk allergy, which is an immune reaction to milk proteins. This is general information and not medical advice; persistent digestive symptoms should be assessed by a qualified clinician.