Resistance to antibiotics occurs through genetic mutations or by acquiring resistance genes via horizontal gene transfer. Mutations in bacterial DNA can lead to changes in drug targets or mechanisms that render antibiotics ineffective. Bacteria can also acquire resistance genes from other bacteria via conjugation, transformation, or transduction. Additionally, bacterial populations with resistance traits can proliferate in the presence of antibiotics, leading to an overall increase in resistant strains.