A long time ago an Asari dreadnought was brought down by an anomaly over Thedas. The sizable crew and the Asari commando units aboard settled onto the planet and mingled with the natives, teaching them to make use of the abundant Element Zero (called 'lyrium' on this world) to manifest potent biotics or magic.
These humans that benefitted first from the tutelage of the Asari became the Tevinter Imperium. In time, they became powerful in their own right. They constructed wonders that Thedas had never seen before, technology fueled by biotics (using element zero/lyrium) or technology that functioned of biological energy (blood magic). The dwindling Asari population, still hoping to someday return to the stars by contacted other Asari, helped the Tevinter construct a beacon that would broadcast a powerful distress signal.
This distress signal did eventually attract the attention of the Council races. The Council saw what the crashed colony of Asari had done to this world called Thedas, and how much they had changed it, and decided that the proper thing to do was to purge the planet of all extraterrestrial influence.
They sent one of their best to take care of this, a Spectre named Andraste. The Asari on Thedas became wise to the Council's plan and used their crude resources to destroy Andraste's ship on arrival. But Andraste was a Spectre, and they are nothing if not resourceful. Recognizing she did not have the capabilities to directly confront the Asari and their Tevinter protectors, Andraste assimilated into the population and used her knowledge to manipulate other races and peoples of Thedas into march against Tevinter.
In the final confrontation, Andraste was, in fact, severely wounded by a Tevinter archon. However, she did not die and ascend to join the Maker as his bride. In actuality, she was extracted from the combat zone by a friendly Council ship.
At this same time, both Andraste and the Asari had failed to notice that the beacon had also attracted the attention of the Geth. The Geth, for uncertain purposes, perhaps to claim the wreckage of the Asari capital ship for their own, endeavored to take control of Thedas. Initially, they did deploy geth troopers, but the native populace, even the weakened Tevinter, proved resilient.
Ultimately, the Geth instead introduced a techno-organic retrovirus akin to the kind used to create Husks. This virus would spread by contact and convert native species to Geth forces, connected by a hive mind similar to the Geth collective mind itself. It turned the native dwarves into genlocks, humans to hurlocks, qunari to ogres, and elves to shrieks, by 'tainting' them and integrating synthetic systems into their organic ones.
The hiveminds for this retrovirus were inevitably centered around nodes or clusters of more powerful AIs that became known as archdemons. The retrovirus could be more effectively produced in so-called Broodmothers.
The first Grey Wardens mastered a 'ritual' that was, in essence, producing a vaccinated 'dead' version of the techno-organic retrovirus by treating it using biotics. Using this vaccine, they could integrate some bit of the synthetic systems into their bodies, and use it to tap into or 'listen' in on Geth communication frequencies.
But more importantly they discovered that the Archdemon AI clusters, when nearing destruction, would begin to transmit all their data and programming into the nearest synthetic. A Grey Warden could disrupt this failsafe by intercepting the data and then destroying it internally.
Of course, most of these facts have been lost through the ages, and the actual truth has become shrouded in myth and legend and stories.
It's all true, according to David Gaider (Bioware head writer) during a Gamespot Fan Q&A session.
He later added:
Andraste's ashes are actually dried-up medi-gel.
The next DLC will be an adventure into buried Prothean ruins.
The tentative title for Dragon Age 2 is Dragon Age: Fulcrum. It will explore more deeply into the nature of the (interdimensional) Fade and will chronicle the events leading up to the Darkspawn overmind's fateful contact with and takeover of the greater Geth neural network that sets the stage for Mass Effect 3.