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.
A community in itself is a group of beings that share something in common and work, interact, and live together. What happens with the community is that the definition of it does not extend to the specifics of which types of ecosystems can come out of the myriad of communities that exist.
Therefore, a community is a formed group of beings with common locality and with a capacity to come together under a common denominator to establish as specific mode of existence, namely, an ecosystem.
An ecosystem is defined by both the biotic (living) and abiotic (nonliving) factors. An ecosystem could be something as small as a pond to something larger such as a forest. Abiotic factors include amount of sunlight, soil and climate. A very large ecosystem could be a biome such as a desert, chapparal, tundra and savanna.
In ecology, a community is defined as the groups of different species living close enough to interact with one another.
These terms are related to one another and it helps to think about them on a scale. Think levels of organization:
organism/individual --> population --> community --> ecosystem -->biosphere
A community is a variety of species living within one area. A community is made up of a variety of populations. Populations are only one type of species. Whereas, an ecosystem contains both biotic and abiotic factors.
A community is a variety of species living with in one are, an ecosystem contains both abiotic and biotic factor