During the past few years, researchers have gained unprecedented control over spins in the solid state. What was considered almost impossible a decade ago, in both conceptual and practical terms, is now a reality: single spins can be isolated, initialized, coherently manipulated and read out using both electrical and optical techniques. Progress has been made towards full control of the quantum states of single and coupled spins in a variety of semiconductors and nanostructures, and towards understanding the mechanisms through which spins lose coherence in these systems. These abilities will allow pioneering investigations of fundamental quantum-mechanical processes and provide pathways towards applications in quantum information processing.