There is variation in a population. Some bacteria are have resistance, others do not.Bacteria with advantegeous characteristics are more likely to survive and reproduce (when antibiotics is used in the host body)The advantageous gene for antibiotic resistance will be based on to following generations of bacteria.This is survival of the fittest.Due to inheritance this gene is passed on to offspring.This process is repeated over generations until populations of bacteria have antibiotics resistance