The three cycles that occur in the terrarium are the water cycle, the nutrient cycle and the oxygen cycle. The balance of each of them is very important to keep the whole terrarium working.
Water cycle: Water of the ground is absorbed by the roots of the plants and evaporated, turning into vapor due to a higher heat. Then it condensates when it cools down again, falling to the ground again.
Nutrient cycle: Include the movement of organic and inorganic matter, mainly due to the food chain. Producer take nutrients from the ground to produce organic matter that is later consumed by insects, for example, or the lack of nutrients itself would produce plants to die. Dead organisms are decomposed, turning back the nutrients to the ground.
Oxygen cycle: Oxygen is required for respiration of animals and plants too (when there is no light). It is released as gas by plants as a secondary product of photosynthesis which also consume CO2. Moreover, oxygen is a part of the water molecule, so it is also influenced by the water cycle.