The Ragman was an entity that fed on violence.
It originated on an asteroid. Whilst travelling through space, the asteroid was exposed to radiations which generated a non-sentient being. It crashed on Earth and became part of a stone circle in Cirbury, drawing power from ley lines.
Sometime later, the mayor's daughter, Emily Sawyer, and the son of a magistrate had sex in the circle. There was a group of mummers nearby, and one came to the lovers begging for money. The son hit him and accidentally killed him. The blood and class-based violence formed the Ragman's identity. It rose from the stone, killed the boy, entered the mummer's corpse and raped Emily.
The townsfolk attack the Ragman, who killed many of them. It then returned to the stone and became dormant. The other mummers were killed, their blood covering the stone. It was moved to Dartmoor, but those who did so were driven insane.
In the 20th century, a group of upper-class students got into a fight with a punk rock band stranded near the stone. This woke up the Ragman, and after everyone was dead, it reanimated the bodies of the band. It used them to spread its message of chaos and class envy.
The Third Doctor confronted the Ragman and was at first defeated, but the Time Lords gave him strength to fight back. When Kane Sawyer, a descendant of the child born from Emily Sawyer's rape, realised that the Ragman was responsible for the failures in his life, he attacked it. They both reentered the stone where they were forever trapped. (PROSE: Rags)