Mediator: When X is related to Y and when the mediator variable is included in the model X's effect diminishes.
Moderator: this involves statistical interaction: e.g., the effectiveness of the intervention depends on student's demographic characteristic.