Strains of microorganisms (bacteria or viruses) are said to develop resistance when they are no longer killed or inhibited by the antibiotics and antiviral drugs that are usually effective against them (or, in practice, when significantly higher than normal doses are required to have an effect). Similarly, cancer cells may develop resistance to chemotherapy drugs.

Resistance appears because of the mutations that take place spontaneously in any group of growing cells, whether exposed to drugs or not. Most such mutations change the cell's structure or biochemical pathways in a harmful way. But some mutations change the parts of the cell that are affected by drugs, decreasing the drug's ability to work (that is, causing resistance). Because such mutations are very rare, there are normally only a few such resistant cells in any group. However, if all or many of the “normal” cells are killed by a drug, a much higher proportion of the survivors are likely to be resistant. If the resistant survivors are not killed by the body's natural defenses, which is more likely when drugs are stopped too soon or not taken in the proper manner, they may reproduce and pass on the resistant trait to their descendants.