There is VARIATION amongst the population due to naturally occuring MUTATION during DNA replication . The antibiotics act as a SELECTION PRESSURE, so only the bacteria with the allele for antibiotic resistance SURVIVE and the others die. The surviving bacteria go on to REPRODUCE and pass on the resistance allele to the next generation. The ALLELE FREQUENCY increases amongst the population of bacteria and so the population becomes more resistant.