Data leakage occurs when information from the test dataset is inadvertently used during the training process, leading to an overly optimistic evaluation of the model’s performance.