Bacteria as well as all microorganisms need for proliferation moisture (water), energy and food. The potential speed of growth is impressive: Under optimal conditions bacteria can grow and divide extremely rapidly and bacterial populations can double as quickly as every 20 minutes.
Bacteria live planctonic, that means distributed in the water phase or sessile, that means that they connected to surfaces, as so called biofilms. Sampling of water phases to check the concentration of bacteria will only detect planktonic ones.
A biofilm is an aggregate of microorganisms in which cells adhere to each other or a surface. Biofilm, which is also referred to as slime (although not everything described as slime is a biofilm), is a polymeric conglomeration generally composed of extracellular DNA, proteins, and polysaccharides.
Completely removement of biofilms is challenging. Residues of biofilms can regenerate themselves quickly.
Formation of a biofilm begins with the attachment of free-floating microorganisms to a surface (source: Prof. Dr. Flemming, University-GH Essen):