Why do animals invest time and resources in social interactions and help each other, when the natural world is driven by fierce competition? Cooperation indeed abounds in the natural world, where organisms form societies whose fabric is made by the seemingly selfless actions of individuals. In this thesis, I used mathematical models to understand how evolution shapes animal societies, namely those of humans, insects, and fish. First, I found that human cooperation can evolve due to the competition between groups, when social behaviours are transmitted through culture, rather than genes. Furthermore, the forms of cultural transmission more favourable for cooperation depend on specific details of how groups compete. As for insect societies, I...