Biofilms are collections of microorganisms like bacteria, yeasts, and protozoa that form on hard surfaces using mechanisms like flagella, hydrophobic cell walls, and sticky polymers. Over 90% of bacteria live in biofilms, which can be useful for water purification but also cause problems by clogging pipes and surfaces. Biofilms encourage altruism as bacteria will sacrifice their own growth for the good of the community.