Soils are classified based on their structure, origin, and composition. They are formed from pieces of rock (rocky soils), sand (sandy soils), clay (clay soils), mixtures of sand and loam (sandy-loamy soils), or decayed organic materials (muck soils). Terrestrial ecosystems include flowering and non-flowering plants that grow in different soil types, while decomposers like fungi and bacteria break down organic matter. Aquatic ecosystems contain plankton, algae, and plants adapted to aquatic environments, and receive organic matter from terrestrial ecosystems through rivers and lakes.