Cooperation occurs at all levels of life, from genomes, complex cells and multicellular organisms to societies and mutualisms between species. A major question for evolutionary biology is what these diverse systems have in common. Here, we review the full breadth of cooperative systems and find that they frequently rely on enforcement mechanisms that suppress selfish behaviour. We discuss many examples, including the suppression of transposable elements, uniparental inheritance of mitochondria and plastids, anti-cancer mechanisms, reciprocation and punishment in humans and other vertebrates, policing in eusocial insects and partner choice in mutualisms between species. To address a lack of accompanying theory, we develop a series of evoluti...