Comparative genomic studies of bacteriophages, especially the tailed phages, together with environmental studies, give a dramatic new picture of the size, genetic structure and dynamics of this population. Sequence comparisons reveal some of the detailed mechanisms by which these viruses evolve and influence the evolution of their bacterial and archaeal hosts. We see rampant horizontal exchange of sequences among genomes, mediated by both homologous and nonhomologous recombination. High frequency exchange among phages occupying similar ecological niches leads to a high degree of mosaic diversity in local populations. Horizontal exchange also takes place at lower frequency across the entire span of phage sequence space.