Bacteriophages attach to bacterial cells and inject their genetic material. This leads to the production of new phages within the bacterial cell. Eventually, the bacterial cell bursts, releasing new phages that can infect other bacteria. This cycle continues until the bacterial infection is cleared.