This paper examines the role of agent heterogeneity and learning on wage dispersion and employment dynamics. In the first half of the paper, I present an equilibrium matching model where heterogeneous workers and firms learn about match quality and bargain over wages. The model generalizes Jovanovic (1979) to the case of heterogeneous workers and firms. Equilibrium wage dispersion arises due to productivity differences across workers, technological differences across firms, and heterogeneity in beliefs about match quality. Under a simple CRS technology, the equilibrium wage is additively separable in worker- and firm-specific components, and in the posterior mean of beliefs about match quality. This parallels the 'person and firm effects' empirical specification of Abowd et. al. (1999, AKM) and others. It consequently provides a theoretical context for the AKM model, and a formal economic interpretation of their empirical person and firm effects. The model also yields an assortative matching result that predicts a negative correlation between estimated person and firm effects, which is consistent with most empirical evidence. Finally, the model makes novel predictions about the relationship between the person and firm effects and separation behavior, job duration, and firm size. In the second half of the paper, I test the model's empirical predictions. I estimate fixed and mixed effects specifications of the equilibrium wage function on the LEHD database. The mixed effect specifications generalize the earlier work of AKM and others. The learning component of the matching model implies a specific structure for the error covariance. I exploit this structure to test whether earnings residuals are consistent with Bayesian learning, and to estimate structural parameters of the matching model. I find considerable support for the matching model in these data.