So you went out and bought all those lovely ingredients to brew up a batch of beer. You have your malt extract and hops and yeast and you brewed up your batch of beer. While doing so you were careful to sanitize (using Star San) or whatever method of sanitizing you do. You add your wort, pitch your yeast and let it ferment. After it's done fermenting you notice that there is a white film on the surface of the beer (and it's not carbonation bubbles). It doesn't look normal. And in some cases it's actually growing mold. So, what do you do? Well, first, you take a sample and smell it and taste it. If it smells and tastes fine then it's probably fine, and many times this is the case. However, if you are catching some sour flavors and odors then the chances are likely that you have an infected beer, especially if there is visible mold on your beer. Insert expletive "F***!". After all this hard work! You're cursing yourself and kicking yourself and damned if you weren't careful with sanitizing. But something went wrong. What can you do now?
If it's contaminated and not too bad to drink then you can bottle it up and condition it and start drinking it as soon as it's carbonated. Drink it young and fast so the bacteria can't overpower the actual taste of the beer.
Or, you can actually wait it out and let it sit for 6 months and let the Saccromyces, Lactobacillus or Pediococcus run its course and see if you enjoy the sour outcome of the beer.
However, there is one other way you can fight this bacteria. You can add 1 campden tablet per gallon (make sure you crush and dissolve it first) and let it sit for a week and then repitch yeast and bottle condition or keg and force carbonate. This will effectively kill the bacteria, however, depending on how far along the infection is, you're still going to have that sour taste or off taste you tasted before you caught the infancy of the infection.
Chilling your beer down after it has conditioned in the bottles will slow the growth but it won't inhibit it.
Sanitize well and hopefully contamination will be warded off, but if you do find yourself with contaminated homebrew, hopefully these tips will help you out.