Ecosystems are the basic functional units of ecology, where energy flows and nutrients are cycled between the biotic and abiotic components.