The cause of lactose intolerance is best explained by describing how a person develops lactase deficiency.
Primary lactase deficiency develops over time and begins after the age of two when the body begins to produce less lactase. Most children who have lactase deficiency do not experience symptoms of lactose intolerance until late adolescence or adulthood.
Researchers have identified a possible genetic link to primary lactase deficiency. Some people inherit a gene from their parents that makes it likely they will develop primary lactase deficiency. This discovery may be useful in developing future genetic tests to identify people at risk for lactose intolerance.
Secondary lactase deficiency results from injury to the small intestine that occurs with severe diarrheal illness, celiac disease, Crohn's disease, or chemotherapy. This type of lactase deficiency can occur at any age but is more common in infancy.
This answer is based on source information from the National Institute of Diabetes and Digestive and Kidney Diseases.