Living things form ecological relationships with one another ranging from direct competition for resources to close, interdependency in which each suffers if the other is removed.

Antagonistic relationships occur when organisms actively inhibit or kill one another.  Parasites such as viruses and other pathogenic microbes kill host cells and tissues either for the purpose of their own replication, to spread through the body of a host, or to gain access to nutrients stored in host cells and tissues.  Such relationships can also occur when one group deprives another of resources indirectly by replicating to the extent that they crowd all other species out (competitive exclusion), or directly by producing antimicrobial compounds such as antibiotics that inhibit the growth of or kill the competitor.

Synergistic relationships occur when two or more species cooperate so each receives greater benefit than either would receive by living separately.  Symbiotic relationships such as mutualism can be strong that neither species will thrive if separated from one another.

Biofilms are communities of microbes that form on the surface of objects such as rocks, the inside of pipes, toilet bowels and teeth.  In biofilm formation on teeth, a microbe such as Streptococcus mutans produces a sticky glycocalyx to trap food and allow adherence to a surface such as teeth.  Other bacteria are attracted to the presence of the streptococci and begin to attach themselves to the glycocalyx as well.  This phenomenon is called quorum sensing.  In time, several different species of bacteria form a thick sticky mass or plaque.  If the plaque is not removed from the teeth, it can harden to form tartar and the accumulated acidic metabolic waste of the bacteria can dissolve tooth enamel, leading to dental caries.

Many microbes, including Salmonella, S. aureus, and Pseudomonas aeruginosa can be involved in the formation of biofilms that enhance pathogenicity.