Brewers are made up of two kinds: those who have had an infected batch, and those who haven't—yet. If you find that one of your batches has been contaminated, sometimes you can wait it out and see what happens and the infection will clear. But sometimes you just have to throw it out and move on.
However, if you notice that you're continually having contaminated batches, here are a few things to look at:
- the sanitizer you're using
- your cleaning methods
- plastic hardware and tubing (you may have to throw it away)
- outspouts and metal hardware
If you're still getting infections after going through the above equipment, the problem is likely in your bottles and kegs.