In that case, you get the infection, you're exposed to the bacteria, you're sick, and then you take, say, an antibiotic which cures it, and those drugs are actually working to kill the bacteria.
En ese caso, contraes la infección, estás expuesto a la bacteria, te enfermas, y tomas un antibiótico que te cura y esas medicinas actúan, de hecho, matando a la bacteria.