An ecosystem is formed by the interaction of living organisms and non-living things in an environment. It consists of two parts - the biotic part made up of all living things like plants, animals, and microorganisms, and the abiotic part made up of non-living things like air, water, soil, and sunlight. An ecosystem includes all the populations of organisms in a community as well as their physical environment, and examples are forests, deserts, ponds, and grasslands. Habitats provide organisms with things like food, water, and shelter. Adaptations help organisms survive in their habitats.