An ecosystem consists of biotic components (living organisms like plants, animals, and microorganisms) and abiotic components (non-living elements like water, soil, and air). These components interact through energy flow (food chains) and nutrient cycles (carbon, nitrogen), maintaining ecological balance and supporting life.