The developments in the field of nanotechnology made possible studies of the magnetic properties of the smallest artificially created nanostructures on metal surfaces: single magnetic atoms and their clusters. These systems exhibit interesting many-particle effects (collective magnetic excitations, substrate-mediated magnetic coupling, Kondo effect) and they may have potential applications in the field of data storage and data processing. I will briefly describe one of the main experimental tools in this field, the scanning tunneling microscope (STM) and its use for measuring magnetic properties at the single-atom level. It is possible to determine the spin of an adsorbed atom, its g-factor, the magnetic anisotropy D and E, the exchange interaction between pairs of adsorbed atoms, J, and the Kondo temperature. I will describe the Kondo impurity model which applies to these systems, the physics of the local momentum screening, and the role of the magnetic anisotropy. I will present the results for the Kondo resonance splitting in the magnetic field in the case of an adsorbate with spin S=3/2 and planar magnetic anisotropy, obtained using the numerical renormalization group techniques. The results agree well with recent experimental measurements in the system of cobalt adsorbed on a thin copper-nitride layer on the surface of copper.