Adatoms, due to having fewer bonds than the other atoms in the crystal, have unbound electrons. These electrons have spin and therefore a magnetic moment. This magnetic moment has no preference for orientation until an external influence, like a magnetic field, is present. The structure of the adatoms on a surface can be adjusted by changing the external magnetic field. Through this method theoretical situations, such as the atomic chain, can be simulated. Quantum mechanics needs to be taken into account when using adatoms due to the small scale.
The magnetic field created by an atom is caused mostly by the orbit and spin of the electrons. The protons and neutrons magnetic moment are negligible when compared to that of the electron due to their larger masses. When an atom with free electrons is inside an external magnetic field, its magnetic moment aligns with the external field because this lowers its energy. This is why bound electrons do not display this magnetic moment, they already have a favorable energy state and it is unfavorable to change. The magnetization of an (magnetically aligned) atom is given by:
Where N is the number of electrons, g is the g-factor, μ is the Bohr magneton, k is the Boltzmann constant, T is the temperature and j is the total angular momentum quantum number. This formula holds under the assumption that the magnetic energy of an electron is given by  and there is no exchange interaction.