An ecosystem is the interaction of a community of living organisms (biotic) with the non-living (abiotic) parts of their environment. The levels of organisation run from a single organism, to a population (all the members of one species in an area), to a community (all the populations living together in an area), and then to the whole ecosystem.
To survive and reproduce, organisms need a supply of materials from their surroundings and from the other living organisms there. When the supply is limited, organisms compete. Plants compete with each other for light and space, and for water and mineral ions from the soil. Animals compete with each other for food, mates and territory.
Within a community each species depends on other species for food, shelter, pollination and seed dispersal. This is called interdependence. If one species is removed, the whole community can be affected. A stable community is one where all the species and environmental factors are in balance, so population sizes stay fairly constant.