Compartmental models are mathematical frameworks used in epidemiology to simplify the complex dynamics of infectious diseases within a population. These models divide the population into distinct compartments based on disease status, such as susceptible, infected, and recovered, to analyze the spread and control of diseases.