Mediation occurs when the effect of an exposure on an outcome is transmitted through one or more intermediary variables, known as mediators. For example, in a study linking smoking to lung cancer, chronic inflammation might be a mediator if smoking leads to inflammation, which in turn increases the risk of lung cancer.