A virus that infects bacteria is called a bacteriophage, or simply a phage. Phages are composed of protein and nucleic acid, either DNA or RNA.
Phages have a head segment or capsid that encloses the nucleic acid in a structure made from proteins. Many phages also have a tail segment that is a hollow tube made of proteins through which the nucleic acids travel when the phage attaches to a bacterium.
Like other viruses, phages are unable to reproduce on their own. Instead, they use the protein synthesis and nucleic acid replication machinery of the bacteria to produce new copies of themselves. Some viruses remain dormant once they have infected the bacterial cell and only become active when the environment within the bacterium changes. Once bacterial cells start to replicate phages, the process will proceed until the abundance of phage particles inside the bacterium causes the cell to burst and release the new phages into the medium.