The main components of an ecosystem include abiotic factors (such as water, sunlight, temperature, soil), biotic factors (living organisms like plants, animals, fungi, bacteria), and the interactions among them. These components work together to create a balanced and sustainable ecosystem.