Communities of plants, animals, and other organisms may be found in such places as a desert, a salt marsh, or a forest. A community is defined as multiple populations interacting with each other at the same time and in the same place. Within a community, each population of organisms has a habitat and may occupy one or more niches. The habitat is the physical place where the organisms live, while the niche is the role or roles 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 indefinitely.

Two populations living together in a community in a close and permanent association is called symbiosis. If the symbiotic relationship is mutually beneficial, it is known as mutualism. 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 known as 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 effective 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 called succession. Primary succession occurs in lifeless areas where soil has not yet formed. An area covered by a lava flow would undergo primary succession. 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 called the climax community.