The lac operon is a group of three genes in E. coli that are involved in processing lactose and their expression is regulated based on the presence of glucose and lactose. When glucose is absent and lactose is present, the bacterium produces the enzyme β-galactosidase to metabolize lactose. The operon's activity is controlled by a repressor protein and an activator protein, allowing gene expression to be efficiently adapted to environmental conditions.