One contribution of 13 to a theme issue 'Solving the puzzle of collective action through inter-individual differences: evidence from primates and humans'. I review the theoretical and experimental literature on the collective action problem in groups whose members differ in various characteristics affecting individual costs, benefits and preferences in collective actions. I focus on evolutionary models that predict how individual efforts and fitnesses, group efforts and the amount of produced collective goods depend on the group's size and heterogeneity, as well as on the benefit and cost functions and parameters. I consider collective actions that aim to overcome the challenges from nature or win competition with neighbouring groups of co-specifics. I show that the largest contributors towards production of collective goods will typically be group members with the highest stake in it or for whom the effort is least costly, or those who have the largest capability or initial endowment. Under some conditions, such group members end up with smaller net pay-offs than the rest of the group. That is, they effectively behave as altruists. With weak nonlinearity in benefit and cost functions, the group effort typically decreases with group size and increases with within-group heterogeneity. With strong nonlinearity in benefit and cost functions, these patterns are reversed. I discuss the implications of theoretical results for animal behaviour, human origins and psychology.