The study of how materials can exhibit magnetic behavior, such as ferromagnetism, antiferromagnetism, and paramagnetism.