|Although this article is based on canonical information, the actual name of this subject is pure conjecture.
King Harren Hoare's grandfather led the ironborn to conquer the Riverlands, previously occupied by the Stormlands. The ironborn cared nothing for the inhabitants of the mainland, and their rule was brutal and tyrannical - far more than any previous occupier. To consolidate their hold on the Riverlands, Harren's grandfather commissioned construction of a great fortress on the northern shore of the Gods Eye lake, in the very heart of the region. The largest and greatest fortress ever built in Westeros, it took three generations to finish. The ironborn broke the backs of the Riverlanders in forced labor to complete an instrument for their own domination. The great castle was finally finished in King Harren's time, and he arrogantly named it "Harrenhal" after himself. On the very same day that the last brick was laid, however, Aegon Targaryen and his sisters landed with their army from Dragonstone at the mouth of the Blackwater River, along with their three dragons.
While Aegon sent his siblings and their dragons to pursue other objectives, he advanced towards Harrenhal with his own force, astride his great dragon Balerion. At the sight of Aegon's arrival, the beleaguered River lords revolted against the ironborn, led by Edmyn Tully of Riverrun. The Riverlanders joined their army to Aegon's, swelling his ranks (though it is said that House Frey offered no help, instead waiting inside their castle and caring only about their own safety). Their combined force then reached Harrenhal.
Because Westeros had never experienced dragon-based warfare, Harren remained confident that the massive walls of Harrenhal would withstand any attack. Indeed, it is said that a million men could have marched against Harrenhal and a million men would have been repulsed. Harrenhal was designed to withstand an attack by land, however, and dragons can fly.
Aegon simply rode Balerion right over the walls, and proceeded to roast Harren and his sons alive within their own tower, rendering House Hoare extinct. The entire castle was blasted with dragon-fire, its once-grand walls and towers left partially ruined and half-melted.
With this awesome display of power, the ironborn fled back to their islands, with the River lords and their Targaryen allies in pursuit. The survivors soon bent the knee to Aegon. With House Hoare destroyed, Aegon needed to raise up a new ironborn family to rule over the others: respectful of ironborn custom, he allowed them to select their own ruler from among themselves. They selected House Greyjoy of Pyke, who ruled the Iron Islands as the Targaryens' vassals for the next three centuries. Further, Aegon reorganized the Riverlands into a separate administrative area (functionally an eighth "kingdom"), and rewarded Edmyn Tully by naming him the first Lord Paramount of the Trident, a title also held by his family for the next three hundred years.
After hearing of how Harren was roasted within his own castle, King Argilac the Arrogant realized that to wait behind the walls of Storm's End was to wait for death, so he chose to face the Targaryens in the field. He faced off against the branch of the Targaryen army led by Orys Baratheon, which included Aegon's sister-wife Rhaenys and her dragon Meraxes. In the resulting battle, known as the Last Storm, the Storm lords were defeated, and Orys personally slew Argilac. Afterwards, they marched west to reunite with Aegon and Visenya.
Similarly shocked by the fall of Harrenhal, King Loren Lannister and King Mern Gardener combined the forces of the Westerlands and the Reach to oppose the Targaryens: uniting the armies of the wealthiest kingdom in Westeros and the most populous kingdom. Hearing word that they were on the march, the united Targaryen army then advanced south, to meet them at the climactic battle in the northern Reach known as the Field of Fire.
As for Harrenhal, it was left half-ruined, but the lands were still among the richest in all of Westeros. Aegon granted rule of what was left of it to his loyal vassals, House Qoherys. However, the entire family died out within a few decades, the first in a long line of families who were granted Harrenhal only to go extinct, leading many to believe that it is cursed.
Even three hundred years later, by the time of the War of the Five Kings, the damage from Aegon's assault is still evident. The ground around Harrenhal is blasted and dead, the towers partially melted from dragonfire. Arya Stark, when she passed through Harrenhal, noted that dragons were responsible for the extensive damage.
In the books
The initial Targaryen army that landed at the mouth of the Blackwater numbered 3,000 men, but later split up to go after different objectives. Aegon's portion may have numbered under 2,000. After the initial landing, Aegon burned Harren's ships on the Trident and on the Gods Eye. As he advanced, the River lords revolted against the ironborn to side with the Targaryens, swelling their ranks so that Aegon's army numbered 8,000 by the time he laid siege to Harrenhal.
The books are not clear regarding whether the Freys took part in the siege or not, though the Season 3 "Histories & Lore" featurettes make it a point that they did not, instead hiding in their castle to wait out the fighting.
When Aegon's forces surrounded Harrenhal, he sent terms to Harren, bluntly offering that he would spare his life if he surrendered, but if not, he and his entire family would burn inside Harrenhal at sundown. Harren rejected the terms, and true to his word, Aegon used Balerion to burn Harren and his sons inside of their own tower. One of the five great towers of the castle, it was forever afterwards known as Kingspyre.