Bacteria have developed different mechanisms to defend against phages, such as preventing phages from being adsorbed on the surface of host bacteria; through the superinfection exclusion (Sie) block of phage’s nucleic acid injection; by restricting modification (R-M) systems, CRISPR-Cas, aborting infection (Abi) and other defense systems to interfere with the replication of phage genes in the host; through the quorum sensing (QS) enhancement of phage’s resistant effect. At the same time, phages have also evolved a variety of counter-defense strategies, such as degrading extracellular polymeric substances (EPS) that mask receptors or recognize new receptors, thereby regaining the ability to adsorb host cells; modifying its own genes to prevent the R-M systems from recognizing phage genes or evolving proteins that can inhibit the R-M complex; through the gene mutation itself, building nucleus-like compartments or evolving anti-CRISPR (Acr) proteins to resist CRISPR-Cas systems; and by producing antirepressors or blocking the combination of autoinducers (AIs) and its receptors to suppress the QS. The arms race between bacteria and phages is conducive to the coevolution between bacteria and phages. This review details bacterial anti-phage strategies and anti-defense strategies of phages and will provide basic theoretical support for phage therapy while deeply understanding the interaction mechanism between bacteria and phages.