In agriculture, the use of pesticides has proved to be problematic, resulting in the emergence of pesticide-resistant pests.
A pest population usually has genetic diversity, with some of the pests having natural resistance to a particular pesticide, while the others are susceptible.
The application of a pesticide kills most of the pests. A few survive, primarily the ones with the resistance. The survivors will reproduce, and the next generation will inherit the resistance to the pesticide.
Every time the pesticide is applied, it kills the vulnerable pests and leaves resistant ones behind to reproduce. A large, pesticide-resistant population now infests the crop.
Over time, the original pesticide will no longer be effective and will have to be applied at a higher dose or a different pesticide will have to be used. Application of a pesticide might even increase the size of the pest population by killing the predators that eat the pests.