An ecosystem is a community of living organisms in a particular space that interact with each other and their abiotic environment.
Ecosystems include a selection of different organisms that have different roles in that ecosystem. At a basic level this will typically include producers, consumers and decomposers. The producers of that ecosystem will also need a way of producing energy (eg. plants use the sun for photosynthesis). On a more complex level, particular organisms may be necessary to maintain the qualities of the soil in the area, to distribute the seeds of plants, and to fill other niches.