Communities of plants, animals, and other organisms may be found in such places as a desert, a salt marsh, or a forest. Within a community, each population of organisms has a habitat and niche. The habitat is the physical place where the organisms live, while the niche is the role that the population plays in the life of the community. The niche is the population's function and position in the ecosystem, and it reflects the population's relationship to other populations. A population's niche is defined by how and when it reproduces, what time of the day and year it is most active, what climatic factors it can withstand, what it eats, and so forth. The competition exclusion principle suggests that two species cannot occupy the same niche in the same place at the same time.
Two populations living together in a community in a close and permanent association issymbiosis. If the symbiotic relationship is mutually beneficial, it is known asmutualism. Lichens represent an example of mutualism. If one population receives a benefit from an association, while the other is neither benefited nor harmed, the symbiosis is commensalism. Humans and the bacteria of their intestines exist commensally. Another type of symbiosis is parasitism, in which one population benefits while the other is harmed. The microorganisms that cause human disease are considered parasites. A final type of symbiosis is synergism. In this instance, two populations accomplish together what neither population could accomplish on its own.
Populations within a community may interact; indeed, one population may capture and feed on the other. Such a relationship is predation. Predators have more than one prey species, but they normally feed upon the most abundant prey species available. As a prey population decreases, the predator switches to a more abundant species. This change causes fluctuations in population sizes.
Natural selection favors the most efficient predator, while also favoring the prey that can escape predation. Among the adaptations that help prey to escape are poisonous toxins, chemical adaptations, warning coloration (camouflage), and mimicry.
In a community, the orderly and predictable replacement of populations over a given period of time in a given area is succession, which is primary succession when new populations are established in new habitats. In secondary succession, communities are established on a site previously occupied by a population. In each succession, certain populations dominate and then decline, to be superseded by new dominant populations. A community at the last stage of succession is the climax community.