Answer is: using antibiotics.
For example antibiotic penicillin:
After it was discovered, penicillin was very effective in destroying the bacterium Staphylococcus aureus. Today, because of natural selection in Staphylococcus aureus populations, they are resistant to antibiotics based on penicillin (Staphylococcus aureus bacterium is resistant to methicillin, β-lactam antibiotic of the penicillin class).
Staphylococcus aureus is a Gram-positive, round-shaped bacterium which causes a skin infections.