The Legacy Virus was actually a viroid and was released by Stryfe, a terrorist from approximately 2,000 years in the future. It originally existed in two forms, Legacy-1 and Legacy-2, but later mutated into a third form, Legacy-3; all were airborne agents.
Legacy-1 and Legacy-2 searched for a target organism's "X-factor", the sequence of mutant genes that gave a mutant his/her superpowers. If it did not find an activated X-factor in the target, the viroid would die off, leaving the person completely unaffected. If, however, it did detect the X-factor, it would begin inserting introns (junk DNA sequences) into the transcription codings of the victim's mutant RNA, the process commonly being triggered after the patient used their powers for the first time after contracting the disease. The result was a major compromise of the replication and transcription process so disruptive as to eventually render the body incapable of creating healthy cells, ultimately resulting in the death of the victim. Revanche
Legacy-1 attacked general transcription and replication of all cells, a messy and non-selective process that resulted in a condition akin to a fast-replicating cancer. This is the version that infected Illyana Rasputin, sister of Colossus. Legacy-2, however, was much closer to Stryfe's original template and more in tune to his desire to stir a species war between humans and mutants. Its attacks were selective, working only on the X-factor genes. The net result was that a victim would eventually lose control of his superhuman powers. In addition to developing at a far slower rate than Legacy-1, victims of Legacy-2 developed skin lesions, fever, cough and overall weakness (symptoms displayed by the telepathic X-Man Revanche). The slow nature of Legacy-2 is why St. John "Pyro" Allerdyce survived for years following his initial infection. Legacy-3 was a complete fluke, accidentally created in the body of the mutant woman known as Infectia. Her powers allowed her to scan and visualize the genetic structure of a living being and then alter it according to her own whims; she was essentially a walking genetics laboratory. Infectia had herself been infected with the Legacy Virus, which her own powers tried to stave off. In doing so, they caused a replication error in the Legacy-2 viroid that was killing her. The viroid's conditioning-to not infect if no X-gene was found in the host-was stripped. When Henry McCoy opened Infectia's containment chamber in an act of compassion to allow her one final look at the night sky, he inadvertently released this new "free agent" strain.
Legacy-3 was capable of infecting any living being that fit within the parameters of its general original template; that is, hominids only, not canines, felines, etc. Moira MacTaggert, long-time ally of the mutant X-Men and one of Earth's top geneticists, seemed to have been the first non-mutant human to be infected with Legacy-3. She passed on the data she had gathered to McCoy, before being killed by an explosion, at her research station on Muir Island, caused by the shapeshifting terrorist Mystique. Professor X did manage to telepathically retrieve the critical information before Moira died, and Beast was able to synthesize the cure a few weeks later. Though one that had a price; the virus had first been released by the death of the first victim, so the release of the cure would cause the same reaction. They vowed to keep working until a safer cure could be found. Colossus, whose little sister Illyana had succumbed to the Virus months before, could not abide by that decision and injected himself with the cure, sacrificing his life to save the world from the disease.
The Legacy Virus was based on a virus created by Apocalypse in the distant future, which was intended to kill the remaining non-mutants. At the time that this alternate version of Apocalypse was killed, the virus had not been perfected, and much like Legacy-3, it targeted all humans indiscriminately. As a result, this virus was never deployed, until Stryfe acquired it and altered it for his own purposes.
Mystique had also created (or commissioned the creation of) a strain of the Legacy viroid that only attacked non-mutant humans, leaving mutants completely untouched.
During the X-Cutioner's Song crossover, the villain Stryfe gave Mister Sinister a canister that he claimed contained 2,000 years worth of genetic material from the Summers bloodline. When Gordon Lefferts, a scientist working for Sinister, opened the canister (in X-Force (vol. 1) #18, January 1993) after Stryfe was apparently killed by Cable, they found nothing inside. Far worse than that, the canister actually contained a plague, Stryfe's "legacy" to the world.
When Colossus' sister Illyana fell ill and died in Uncanny X-Men #303 (August 1993), he left the X-Men and joined Magneto's Acolytes, but later returned. His teammate Beast developed a cure for the virus, but in order for it to be quickly dispersed, a mutant had to sacrifice himself. Colossus did not want any more people to suffer his sister's fate, so he injected himself with the Legacy cure and activated his mutant powers, transforming his body into organic steel. This supercharged the Legacy cure and simultaneously killed him and stopped the spread of the Legacy virus (in Uncanny X-Men #390, March 2001).
Much later, it was revealed Colossus had been resurrected by alien technology and was being used as a test subject for an experimental formula that would reverse mutations; he was eventually rescued by the X-Men, however, and rejoined the team.
Unfortunately, this rapid cure had unforeseen geopolitical effects. Thousands of Legacy-infected mutants and mutates had been quarantined on the island nation of Genosha, which was controlled by Magneto at the time. The instant cure gave Magneto a vast army overnight and allowed him to begin carrying out his plans for world conquest in the Eve of Destruction crossover.
In X-Factor (vol. 3) #10, it was revealed that Singularity Investigations was creating a virus designed to kill mutants. While Jamie Madrox referred to this as the Legacy Virus, it is unclear whether Singularity is actually recreating Stryfe's virus or merely engineering a new one with a similar purpose.