The built environment comprises all structures built by humans, including our homes, workplaces, schools and vehicles. As in any ecosystem on Earth, microorganisms have been found in every part of the built environment that has been studied. They exist in the air, on surfaces and on building materials, usually dispersed by humans, animals and outdoor sources. Those microbial communities and their metabolites have been implied to cause (or exacerbate) and prevent (or mitigate) human disease. In this Review, we outline the history of the field of microbiology of the built environment and discuss recent insights that have been gained into microbial ecology, adaptation and evolution of this ecosystem. Finally, we consider the implications of this research, specifically, how it is changing the types of materials we use in buildings and how our built environments affect human health.