An ecosystem consists of three main components: the habitat, the living things within it, and the relationships between them. The habitat includes non-living elements like rocks, soil, water and air that provide characteristics like temperature and humidity. All parts of an ecosystem are interconnected, as living things depend on each other and their habitat for survival. Ecosystems maintain balance when all relationships, such as producers making their own food, consumers eating other organisms, and decomposers breaking down waste, are functioning properly. However, human activities like overconsumption of natural resources and pollution are disrupting ecosystems.