The theory of magnetic hardening and its impact on the design of permanent magnets is presented. The statistical theory of domain-wall pinning by sample inhomogeneities is outlined, and its relevance to the latest generation of permanent magnets is discussed.