Structure and properties of magnetic materials