An ecosystem is formed by the interaction of living organisms with each other and their environment. It contains biotic components like plants and animals, and abiotic components from the non-living environment like temperature, water, soil and light intensity. Producers like plants are the basic food source, while consumers feed on producers or other organisms and are divided into primary, secondary and tertiary consumers depending on their trophic level. Different abiotic factors influence the types of organisms present and their distribution in an ecosystem.