The creature commonly known as bloodworm or plasmacyte is the result of a deliberate mutation, presumably by the Regulans, a manipulation of creatures known as wavicle spores for waht is believed to be military purposes.
Wavicle spores were originally mostly harmless creatures, using oxygen only as a catalyst for tranformation in their next life cycle. After their mutation, when entering in contact with a redblooded creature, they turn to particles and, at certain level of concentration in an organism, transform into plasmacytes aka bloodworms, leech-looking creatures which feed aggressively on the blood of living organisms. In this state, the creature uses more energy eating than it gains by doing so and is therefore stuck in a loop in which what it eats only fuel its own appetite. They cannot really be killed, as destroying their form only shatteres them back into wavicles, ready to turn to particle when reexposed to blood. As such, the plasmacyte state could be considered a disease, one that can only be cured by reversing the mutation.
Without the mutation, wavicle spores would, when achieving a given level of concentration, turn into giant wavicle butterfly-like form refered to as Sparkle Dancers. It remains uncertain if in natural conditions, they would require an organic host to do so or just a sufficient amount of oxygen or other gas would suffice.Source: Star Trek Universe. (Star Trek Phase 2: Blood and Fire) It remains uncertain that theinterpretation of the Regulan Bloodworm described aboce is canon to the official Star Trek universe. It nevertheless is now officially part of the pop culture related to that franchise thanks to the people at Star Trek New Voyages who made the creature pivotal to the Blood and Fire episode of their webseries. What is officially known about the bloodworm is that, under its plasmacyte state, it was native/discovered in the Regulan system. It has been described as soft and spineless. Medically, it has been known to be used medically under controlled conditions in the 22nd century for cleansing a being's lymphatic system. (ENT: "Doctor's Orders"). What the Blood and Fire episode (and the novel and TNG rejected episode it is based on) added to the lore was that the plasmacyte was developed by the Regulans as a biological weapon, that the leeches reproduced at an astronomical rate and wiped out the Regulans. Once left without nurrishment sources, they starved and shattered, reverting to their wavicle state until space explorer came to the Regulan system. As the wavicles appear to be able to survive in space, it remains unknown if, under their initial state, they were indigenous to the Regulan system or came to be there by other means.
Wavicle spores floating in the air. (Check small luminous specs).
Wavicle spores in their aberrant next life cycle, the plasmacyte aka Bloodworm.
The Wavicle spore's natural next life cycle state, the Wavicle Sparkle Dancer.