So when we give an antibiotic (a drug that kills bacteria) it will kill all of the bacteria that are sensitive to it, if it's taken correctly. A few bacteria may have an adaptation allowing them to resist and therefore survive the antibiotic but the body can deal with these as there's so few bacteria left. If someone doesn't finish their course of antibiotics, more bacteria are left and they multiply, including the ones with the mutation allowing them to be resistant to the antibiotic, and because there are plenty left due to the person not taking all of their antibiotics, the body can't always destroy the remaining bacteria. This means that the infection comes back, but this time it won't respond to the first antibiotic that was given because the surviving population has become resistant.