The fundamental lemma is an identity of integrals playing an important role in the Langlands program. This identity was reformulated into a statement about the cohomology of moduli spaces of Higgs bundles, called the geometric stabilization theorem, and proved in this form by Ngô. I will give an introduction to these results and explain a new proof of the geometric stabilization theorem, which is joint work with Michael Groechenig and Dimitri Wyss, using the technique of $p$-adic integration.