I begin with a proposed global phase diagram of the cuprate superconductors as a function of carrier concentration, magnetic field, and temperature, and highlight its connection to numerous recent experiments. The phase diagram is then used as a point of departure for a pedagogical review of various quantum phases and phase transitions of insulators, superconductors, and metals. The bond operator method is used to describe the transition of dimerized antiferromagnetic insulators between magnetically ordered states and spin-gap states. The Schwinger boson method is applied to frustrated square lattice antiferromagnets: phase diagrams containing collinear and spirally ordered magnetic states, Z_2 spin liquids, and valence bond solids are presented, and described by an effective gauge theory of spinons. Insights from these theories of insulators are then applied to a variety of symmetry breaking transitions in d-wave superconductors. The latter systems also contain fermionic quasiparticles with a massless Dirac spectrum, and their influence on the order parameter fluctuations and quantum criticality is carefully discussed. I conclude with an introduction to strong coupling problems associated with symmetry breaking transitions in two-dimensional metals, where the order parameter fluctuations couple to a gapless line of fermionic excitations along the Fermi surface.