Cyanobacteria are Gram‐stain‐negative, oxygenic phototrophic bacteria, and nearly all species possess photosystems I and II. They show a considerable physiological and morphological diversity that allows them to proliferate in the photic zones of planktonic and benthic freshwater and marine habitats and terrestrial environments, and form symbiotic relationships with fungi, protists, plants, and animals. Due to their ability to adapt to diverse environmental conditions, they thrive and often are key primary producers in extreme environments, including permanently cold freshwater aquatic ecosystems, geothermal springs, and arid terrestrial ecosystems. Cyanobacteria contribute to ecosystem functioning as a primary producer and also as fixers of atmospheric nitrogen. They are also important for human health and water quality because of the production of toxins. This article provides an overview of the ecology of cyanobacteria, their physiology and molecular insights into their ability to grow under diverse environmental conditions, and examination of their biogeography.