A lag creates a column containing the value of the series n periods earlier, with shift(n). It lets a model use the recent past as a feature. A positive lag looks backward; a negative lag would use the future and cause leakage.
Example
df['ventes_j_moins_7'] = df['ventes'].shift(7)