Antibiotic resistance develops through genetic mutations or by acquiring resistance genes from other bacteria. These genetic changes can occur spontaneously or through horizontal gene transfer mechanisms such as conjugation, transformation, and transduction. Over time, the selective pressure exerted by antibiotic use favors the survival of resistant strains, leading to the proliferation of resistant bacteria.