Random effects are variables in a statistical model that capture unobserved heterogeneity in the data. In epidemiology, these effects account for variations across different groups or clusters that are not explicitly modeled but can influence the outcome of the study. They are crucial in understanding the variability in responses due to unmeasured factors.