The main difference between a community and an ecosystem is that the ecosystem is defined as the result of what happens when a community of living organisms shares and interacts within their environment. What this means is that the ecosystem is a product of a specific community. There are several types of ecosystems, for example, a marine ecosystem, the rain forest ecosystem, the swamp ecosystem, and the desert ecosystem, just to name a few.
Hope this helped. :)