The article provides an explanation of the ferro-, para- and diamagnetic properties of metals based on the structure of the atom and the compensation of magnetic moments. The main patterns of change in the magnetic properties of elements depending on the element's serial number are indicated. Examples of ferro-, para- and diamagnets are given. A list of metals that are not attracted to magnets in everyday life is given. Examples of alloys that are attracted and not attracted to magnets are considered