Within the initial population of bacteria, some will have an allele that provides them with resistance to a specific antibiotic which is due to mutations, random spontaneous changes in the base sequence of DNA. This gene may code for an enzyme that would destroy the antibiotic, therefore there will be no adverse effect on the bacterium. When the antibiotic is applied to the population (this is the selection pressure) the bacteria without this allele will die, leaving the bacteria which carry the advantageous allele.
Having survived the first antibiotic application, the remaining bacteria will produce via binary fission, producing genetically identical cells which will all carry the allele providing antibiotic resistance. This process will be repeated over many generations, resulting in a new bacterial population that is resistant to the antibiotic.