Bacteria can evolve very quickly because they reproduce at a fast rate. Every so often a mutation in a bacterial pathogen produces a new strain. Most mutations make no difference, but some strains are resistant to an antibiotic, which means the antibiotic does not kill them.
This is natural selection in action. When a person takes an antibiotic, the non-resistant bacteria die, but a resistant bacterium survives. It reproduces, and its offspring inherit the resistance. Over time the population of the resistant strain rises, and the antibiotic stops working against it. MRSA is a well-known example: it is resistant to many antibiotics and is difficult to treat, especially in hospitals.
We can slow the spread of resistant strains. Doctors should not prescribe antibiotics inappropriately, for example for viral infections or non-serious infections, because antibiotics do not kill viruses. Patients should complete the whole course of antibiotics so that all the bacteria are killed and none are left to become resistant. The use of antibiotics in farming should also be restricted.
New antibiotics are costly and slow to develop. This means development is unlikely to keep up with the emergence of new resistant strains.