The Maggot is actually anything but a maggot - though the mistake is understandable, given the aesthetics of the creature. In fact, they are rather collectives of symbiotic smaller creatures, working together in order to reach the planet surface where they hope to suck up solar radiation before returning to the depths. Generally docile and harmless, many express disgust at the sight and incriminating smell of the Maggots, preferring to walk in great circles around them rather than getting their boots or gear soaked in the approximate feel and smell of burning piles of soiled diapers.
— Miner's Manual Description
The Maggot is a passive creature that spawns in any biome. Magma Core, Azure Weald, Hollow Bough, and Fungus Bogs all have specific variants, while the rest of the biomes have the normal Maggot.
The Maggot is a passive, non-combat creature. However, its biome-specific counterparts have hazardous on-death effects:
The red Maggots in the Magma Core will detonate upon being killed, dealing a small amount of damage to Dwarves and creatures within melee range and leaving behind a layer of hazardous hot rock.
The green Maggots in the Radioactive Exclusion Zone and Fungus Bogs will release a cloud of deadly toxins when killed, dealing a small amount of damage over time to Dwarves and creatures in a small radius.
There are colored maggots in Hollow Bough and Azure Weald as well, but they do not have any death effects.