Cephlies were originally extremely advanced technologically. They created nanobots which covered and permeated the planet. They were powered by six satellites that gathered solar energy. The nanobots could manipulate matter and energy, granting many desires of the Cephlies.
However, around the 10th century, one of them wanted a more colourful night sky. The system did so be generating a massive energy beam that turned a nearby star supernova. This caused a tremendous power drain and the decline of the Cephlie civilisation.
When the First Doctor arrived on the planet two thousand years later, it had been colonised by humans for eight hundred years. Once he discovered the true nature of the "magic" on Avalon, he found Merlin's Helm, the control device for the system. Ian Chesterton turned it over to the Cephlies, who used it to destroy the system, nanobots and all, finally freed and able to die as they had wanted to for centuries. (PROSE: The Sorcerer's Apprentice)