Game of Thrones' Aerys II Targaryen is one of Westeros' greatest villains, but what made the Mad King go crazy, and just what was his plan? The final Targaryen King was murdered by Jaime Lannister at the end of Robert's Rebellion, earning him the 'Kingslayer' nickname, but the reasons for Aerys' madness are never fully stated.
One of the most popular Game of Thrones fan theories about the Mad King is that his madness was a result of Bran Stark warging into him, since Bran had a vision of Aerys and had already affected Hodor. However, that ignores all of the events in the Targaryen King's life that drove him to insanity.
Aerys II Targaryen didn't start out mad. He was considered a charming and charismatic young man and was a decorated war hero. He became King after almost the entire Targaryen line was wiped out in the tragedy at Summerhall, a fire that killed Aerys' father, Aegon V (his grandfather in the books, streamlined for Game of Thrones). The only ones to escape alive were Aerys, his sister-wife Rhaella (whom he'd been forced to marry), and their newborn son, Rhaegar. So already at the outset of his rule, he had a horrific tragedy and the weight of leading the last of a family line (one already prone to madness).
Rhaella had a number of miscarriages, stillbirths, and sons who died during infancy, and these losses started to take their toll. At the same time, Aerys grew increasingly jealous of his Hand, Tywin Lannister. The pair had been childhood friends and fought together, but because of Tywin's competency and a belief around the Seven Kingdoms that he was the true ruler (something that led to Aerys having Ser Ilyn Payne's tongue removed), their relationship deteriorated, slowly at first and then with increasing bitterness as Aerys started to frequently slight Tywin and go against his advice. Then came the true Mad King turning point: The Defiance of Duskendale.
Lord Denys Darklyn of Duskendale desired more freedom from the crown, and stopped making the necessary payments. Aerys, invited to discuss matters, walked straight into a trap at Duskendale and was taken prisoner for six months, before being rescued by Ser Barristan Selmy. Upon being freed, he had all of House Darklyn killed. The isolation and fear of his imprisonment rapidly sped up Aerys' descent into madness, and he didn't leave the Red Keep for years. Again, this only fed into his paranoia: his relationship with Tywin was damaged beyond repair, and he started to distrust his own son as well, while he became increasingly cruel. He had people murdered, became obsessed with wildfire, and generally did as he pleased. He developed a fear of sharp objects, refusing to have his hair or fingernails cut, and his suspicion of poison led to him becoming gaunt (although his appearance was cleaned up in Game of Thrones' sixth season).
Thus Aerys became known as the Mad King. When Rhaegar reportedly kidnaped Lyanna Stark, her brother, Brandon, marched to King's Landing and demanded he come out. He instead found Aerys, who had him imprisoned and called for his father to come to King's Landing. Aerys killed Rickard Stark in a trial by combat, using fire as his champion, and made Brandon strangle himself to death while trying to save his father. That led to Robert's Rebellion, and the ultimate downfall of Aerys. His obsession with wildfire had led him to store caches all over King's Landing, and he planned to blow it all up if the city fell.
This wasn't just a contingency, nor, as Jaime speculates, to become a dragon, but because the Mad King believed he was above the law. It was also the ultimate end result of the plots - real or imagined - against him: Aerys suspected Rhaegar was planning to overthrow him, while the 'Southron Ambitions' theory posits that a group of Lords (those who'd form the backbone of Robert's Rebellion, and their fathers) were already planning to remove Aerys from power long before the Rebellion. Aerys also wanted to destroy King's Landing because he didn't want anyone besides himself sitting on the Iron Throne. These are elements that would later be mirrored by Daenerys' descent in Game of Thrones' final season when she DID destroy the city. What makes the Mad King such a vile, vicious Game of Thrones villain though is that these acts weren't just out of insanity, but a knowing cruelness too.