Emergence of π-magnetism in open-shell nanographenes has been theoretically predicted decades ago but their experimental characterization was elusive due to the strong chemical reactivity that makes their synthesis and stabilization difficult. In recent years, on-surface synthesis under vacuum conditions has provided unprecedented opportunities for atomically precise engineering of nanographenes, which in combination with scanning probe techniques have led to a substantial progress in our capabilities to realize localized electron spin states and to control electron spin interactions at the atomic scale. Here we review the essential concepts and the remarkable advances in the last few years, and outline the versatility of carbon-based π-magnetic materials as an interesting platform for applications in spintronics and quantum technologies.