Many contributions suggest that earnings instability has increased during the 1980s and 1990s. This paper develops and estimates an on-the-job search model of the labor market to study the contribution of wage inequality and job mobility in explaining earnings instability. To study the evolution over time of these different components we extract two estimation samples (late 1980s and late1990s) from the Calendar Section of the PSID. We find that the main differences in the structure of the labor market between the two periods are in the job-to-job mobility and in the variance of the wage offer distributions: they both increase in the late 1990s. By generating counterfactual experiments, we also show that they both significantly contribute to the increase in earnings instability even if it is only their joint effect that generates what we observe in the data. Finally, we show that significant composition effects are at work since the behavior of skilled workers and unskilled workers are very different with respect to the above-mentioned labor market dynamics.