Autoregresive (AR) models and stationarity - Contradiction?


I have a problem regarding the general understanding of autoregressive (AR) models (and related models, such as MA and AR(I)MA models) which are used to analyze time series. An important assumption in these models is that we have stationarity, which implies that the mean and the variance do not change in time.

However, these models are created to explicitely model a dependency of the response variable on its previous values, which e.g. leads to oscillations of the response variable.

Isn't this a contradiction? How do these two parts fit together?

Thanks in advance