Community ecology studies how organisms interact in ecosystems. Organisms often interact with their environment through their effects on other organisms. In the study of community ecology, communities are defined as the organisms (or groups of organisms) that interact on the same scale. Communities may be defined on a number of scales ranging from the local scale (e.g. the interaction of a single tree with its immediate surroundings), to a regional scale (e.g. the interaction of a single forest with its watershed), to a global scale (e.g., the interaction of the totality of Earth's biota). The study of the structure and function of communities is known as community ecology. The study of how organisms interact within a defined community is known as a community-level interaction, and the study of how community structure is affected by environmental factors and interactions is known as community-level ecology. The study of communities is distinct from that of ecosystems. Ecosystems refer to the more complex interactions between organisms and their environment encompassing the physical setting in which they live. The term ecosystem includes the organisms, their environment, and all biotic and abiotic interactions within it. A community, in contrast, is the collection of interacting organisms in a specific area. Theoretical and empirical ecology has developed its own set of terms, such as metacommunity, metapopulation, and metacommunity. While these terms can be defined in terms of one another, many ecologists prefer to begin with a community and study it to its ecosystemic and global levels. This is the basic approach in community ecology. In community ecology, the population of a community is often divided into two groups: the resident community and the transient community. The resident community may also be referred to as the "permanent community", and the transient community as the "incoming community". The resident community of a particular location is often referred to as the local community. The resident community of a local community may not be static, but may change in composition and number through the year as various organisms disperse from and to their local populations and through natural and anthropogenic dispersal. The transient community, on the other hand, may change in composition and number not only through the year, but also annually, seasonally, and cyclically. The local community of a particular location may change in composition and number through a variety of processes. This may include natural processes such as dispersal and migration, as well as human-mediated processes such as habitat alteration and urbanization. Ecologists often categorize the dynamics of communities into four phases: immobile, transient, active, and quiescent. The immobile phase is the phase that occurs before the community is perturbed. A community is in this phase while it is stable. It is also sometimes referred to as the homeostatic phase. The transient phase occurs after the community is perturbed. It is the period of time when the community experiences change. This phase is often referred to as the disturbance phase. The active phase is the phase during which the community is in a state of change. It is the period of time when the community undergoes a sequence of events in which it moves from one stable state to another. During the active phase, the community may experience accelerated change, such as the invasion of a new species or the onset of a disturbance. The quiescent phase is the phase in which the community is in a stable stage of equilibrium. It is the period of time during which the community is not undergoing change. The quiescent phase is also sometimes referred to as the stationary phase.