The processes that occur within an ecosystem, such as nutrient cycling, pollination, and pest control.