There is natural variation in a species. A selection pressure occurs. The best adapted organisms survive for longer and reproduce more. Their offspring inherit the beneficial characteristics
Choose the parents with the desired characteristics and breed them together. Choose the offspring with the desired characteristics and breed them. Continue this over many generations.
Mutations in bacteria create new strains, these bacteria are resistant to the antibiotics and so aren't killed. These bacteria survive and reproduce, their offspring will inherit the resistant gene.