Cooperative behavior, the costly provision of benefits to others, is common across all domains of life. This review article discusses cooperative behavior in the microbial world, mediated by the exchange of extracellular products called public goods. We focus on model species for which the production of a public good and the related growth disadvantage for the producing cells are well described. To unveil the biological and ecological factors promoting the emergence and stability of cooperative traits we take an interdisciplinary perspective and review insights gained from both mathematical models and well-controlled experimental model systems. Ecologically, we include crucial aspects of the microbial life cycle into our analysis and particularly consider population structures where an ensemble of local communities (sub populations) continuously emerge, grow, and disappear again. Biologically, we explicitly consider the synthesis and regulation of public good production. The discussion of the theoretical approaches includes general evolutionary concepts, population dynamics, and evolutionary game theory. As a specific but generic biological example we consider populations of Pseudomonas putida and its regulation and utilization of pyoverdines, iron scavenging molecules. The review closes with an overview on cooperation in spatially extended systems and also provides a critical assessment of the insights gained from the experimental and theoretical studies discussed. Current challenges and important new research opportunities are discussed, including the biochemical regulation of public goods, more realistic ecological scenarios resembling native environments, cell to cell signalling, and multi-species communities.