Bacteriophages, also known as phages, are the viruses that infect bacteria. Phages are extremely abundant in aquatic and terrestrial environments, and are seemingly present wherever their host bacteria can thrive. Phage ecology is the study of the interactions between phages and biological populations and communities, including other phages, bacteria and eukaryotes. In addition, phage ecologists study phage interactions with, and impacts on, the abiotic components of habitats, often in the contexts of energy flow and nutrient cycling. Here we review phage ecology from several perspectives: phage environmental microbiology (phage prevalence, diversity, functioning, etc. within environments), phage population ecology (phage interactions with similar phages), phage community ecology (phage interactions with dissimilar phages and other organisms), and phage ecosystem ecology (phage impacts on the biotic and abiotic aspects of ecosystems).