Magnetic impurities in solids cause manifold changes in their macroscopic properties, such as anomalous low temperature resistance due to Kondo screening, reduction of the superconducting transition temperature due to local suppression of the order parameter, they create magnetic signatures in semiconductors, and lead to inelastic spin excitations in tunnel junctions. In the present paper we review what has been learnt about these effects from a surface science approach. Placing the magnetic impurities at well defined adsorption sites on single crystal surfaces makes their effect on the host, as well as their own magnetic properties better accessible to experiments, and also better understandable since the atomic environment of the impurity is exactly known lending comparison with theory more direct. After an introduction we discuss X-ray magnetic circular dichroism measurements which are spatially averaging and therefore report on ensemble properties. One of the recent progresses achieved in surface science is the preparation of well defined ensembles, such as surfaces with only single adatoms, each of them in an identical atomic environment and with sufficient mutual distance to exclude interactions. Due to this approach we can now determine the electronic configuration of individual adatoms, their hybridization with the host, and quantify their spin and orbital moments, as well as the spin–orbit induced magneto-crystalline anisotropy, which can be orders of magnitude larger than thin film and bulk values. In the second part we review recent progress in revealing the magnetic properties of individual atoms with the scanning tunneling microscope (STM). With this technique the spatial extent of the Kondo screening cloud and of subgap excitations in the superconductor quasiparticle density of states became apparent. We outline the first pioneering experiments measuring transport through reversible atomic point contacts containing magnetic atoms and measurements using the subgap features caused in superconducting STM tips to detect the magnetism of individual atoms. We then describe experiments using inelastic spin excitation spectroscopy to pin down the magnetic ground state and anisotropy energy of magnetic impurities. We continue with spin-polarized STM experiments reporting magnetization curves of individual magnetic adatoms and finish by a description of the most recent spin-excitation experiments revealing the necessary anisotropy environment for a high spin impurity to display the Kondo effect.