A mediator is a variable that lies on the causal pathway between an exposure and an outcome. For instance, consider the relationship between smoking (exposure) and lung cancer (outcome). In this scenario, chronic inflammation could act as a mediator that explains how smoking leads to lung cancer.