Glowworms are native to Australia and New Zealand, where they are found in dark, humid habitats such as caves, dense undergrowth, road cuts, and even under balconies. The part of the life cycle that we recognise as the glowworm is actually the larva of a fungus gnat -- or, a maggot. But these maggots are pretty special. For one thing, they glow in the dark. For another thing, it's actually their butt that glows, not their head. And also, their biowaste chemicals are used to make light instead of poop.
Glowworms build nests out of mucus and silk, with numerous sticky strands hanging down like a curtain. Flying insects become ensnared on these strands, and are quickly reeled in to provide a meal for the glowworm. Glowworms spend around nine months in this stage, before metamorphosing into a chrysalis similar to how caterpillars do. But instead of emerging as a butterfly, they become a gnat. The gnat only lives a few days and does not feed during this time; its sole purpose is to reproduce before dying.
Glowworms are under threat because of the rarity of their habitats, climate change drying up the streams that their food lives in, and human disturbance like light, noise, and smoke.