Foundational tenets of ecology, “ecosystem” and “biome” are easily confused and overlap significantly. Nonetheless, they describe their own fundamental categorizations of the Earth’s surface and processes. A biome occupies a particular scale, while ecosystems can be defined on multiple levels of space and time -- folding into one another as perspective broadens to encompass the planet as a whole.
An ecosystem is an interacting community of organisms and their physical environments, from soil minerals to topographic formations to weather patterns. The essential function of such a system is to capture and distribute energy and to cycle nutrients. Energy in the form of light and heat flows through ecosystems and in nearly all cases derives from solar radiation captured by green plants and other photosynthetic organisms. Matter, meanwhile, exists in inherently limited quantity on the planet and must therefore be cycled, or reused. Animals require plants to make solar energy available to them in usable form, and plants require animals to cycle nutrients. Ecosystems exist on all scales, from microscopic bacterial communities to the entire Earth -- the global ecosystem being the biosphere.
Ecosystem biota -- the living organisms that contribute to the system along with abiotic elements such as minerals and sunlight -- are often categorized based on their method of obtaining energy. One scheme calls photosynthetic organisms such as green plants “producers.” The animals that directly eat those plants are “primary consumers,” and the predators that consume those plant-eating animals to access energy are “secondary consumers.” “Decomposers” break down dead producers and consumers to relinquish nutrients back into the cycle. An even more basic model simply divides the “autotrophs,” organisms able to produce their own food energy, from “heterotrophs,” those that cannot.
A biome is an ecological concept closely related to an ecosystem. It typically refers to a large-scale community of organisms shaped by common environmental conditions, such as patterns of climate and geology. Usually a biome is named after its predominant vegetation association: for example, tropical rainforest versus midlatitude deciduous forest; or, more broadly, forest versus grassland versus desert and so on. Very roughly, a biome may be thought of as the biotic community of a large-scale ecosystem, and while the abiotic components are implied as the shaping factors of a biome, they aren’t explicitly referenced in the term as they are in an ecosystem. A biome, which encompasses numerous smaller-scale ecosystems, is general and global. The tropical-rainforest biome references that ecological community across the planet, from South America to Southeast Asia. By contrast, you might speak of the Amazon Basin rainforest as a specific ecosystem distinct -- in species composition, hydrology and other factors -- from the Congo Basin rainforest.
The concept of “habitat” is sometimes erroneously conflated with ecosystem but technically describes a landscape specifically as it provides food and shelter to a given organism. A snag is habitat to a cavity-nesting woodpecker; both the dead tree and the bird, meanwhile, play roles in the broader forest ecosystem. The term "ecoregion" is used by some authorities, such as the U.S. Environmental Protection Agency and the World Wildlife Fund, to designate a natural landscape with interacting ecological communities of shared environmental context -- a classification similar to but usually smaller-scale than a biome. Various scientific disciplines investigate the spatial distribution and function of ecosystems and biomes. These include biogeography, ecosystem geography and landscape ecology, all of which overlap somewhat with one another.