An ecosystem is a community of organisms and their physical environment that interact. It includes biotic factors like producers, consumers, and decomposers, as well as abiotic factors such as climate, soil, and water. Energy flows through the ecosystem in food chains and webs while matter is recycled through biotic and abiotic interactions. Ecological succession over time leads to the development of climax communities as the environment changes.