Organisms in an ecosystem depend on each other according to the food intake and need for shelter.
This interdependence in the nature is called Symbiotic relationship.
For example organisms like lichens contains chlorophyll, it is an alga which lives along with a fungus.
The fungus provides the alga with shelter food and nutrients while the alga prepares food for the fungus through photosynthesis.
And another example is plants depend on a few types of bacteria for nutrients, herbivores depend upon plants for food and carnivores and omnivores like lions, hyenas depend on herbivores for food.