Given a compact Riemann surface, nonabelian Hodge theory relates topological and algebro-geometric objects associated to it. Specifically, complex representations of the fundamental group are in correspondence with algebraic vector bundles, equipped with an extra structure called a Higgs field. This gives a transcendental matching between two very different moduli spaces associated with the Riemann surface: the character variety (parameterizing representations of the fundamental group) and the Hitchin moduli space (parameterizing Higgs bundles). In 2010, de Cataldo, Hausel, and Migliorini proposed the P=W conjecture, which gives a precise link between the topology of the Hitchin space and the Hodge theory of the character variety, imposing surprising constraints on each side. I will introduce the conjecture, review its recent proofs, and discuss how the geometry hidden behind the P=W phenomenon is connected to other branches of mathematics.