An understanding of the quantum mechanical nature of magnetism has led to the development of new magnetic materials which are used as permanent magnets, sensors, and information storage. Behind these practical applications lie a range of fundamental ideas, including symmetry breaking, order parameters, excitations, frustration, and reduced dimensionality. This superb new textbook presents a logical account of these ideas, staring from basic concepts in electromagnetsim and quantum mechanics. It outlines the origin of magnetic moments in atoms and how these moments can be affected by their local environment inside a crystal. The different types of interactions which can be present between magnetic moments are described. The final chapters of the book are devoted to the magnetic properties of metals, and to the complex behaviour which can occur when competing magnetic interactions are present and/or the system has a reduced dimensionality. Throughout the text, the theorectical principles are applied to real systems. There is substantial discussion of experimental techniques and current reserach topics. The book is copiously illustrated and contains detailed appendices which cover the fundamental principles.