Fans of Game of Thrones have been waiting for Cersei's death since the very first season; for some, since the pilot episode. Despite both the boos and the series working to make the Lannister sibling a more three-dimensional character beyond just a simple Evil Queen, Cersei has never been a character people loved but instead, loved to hate. Between her responsibility for Ned's death, her turning a blind eye to Joffrey's behavior, her responsibility for the Faith takeover, and the Sept of Baelor explosion, it's been well past time for her to go. Even so, Jaime and Cersei's death scene was still something of a shock to viewers. Warning: Spoilers for Game of Thrones Season 8 follow.
Though the show skipped over it, the manner of Cersei's death has been suspected for a long time. In the books, Maggy the Frog doesn't just tell Cersei of a beautiful queen who will cast her down, or that her children will die. The full quote when Cersei asks if she and "The King" will have children is as follows:
Oh, aye. Six-and-ten for him, and three for you. Gold shall be their crowns and gold their shrouds. And when your tears have drowned you, the valonqar shall wrap his hands about your pale white throat and choke the life from you.
"Valonqar" is High Valyrian for "Little Brother." Cersei always believed it meant Tyrion, but she has two little brothers: Jaime is younger by several minutes.
In the end, it wasn't Jaime or Tyrion who killed her. Or at least not directly. Instead, Tyrion repaid Jaime for letting him live at the end of Season 4. He let Jaime go from the Targaryen camp where Daenerys was holding him prisoner and told him to get in the castle, escape through the dragon pit, and take Cersei far away across the sea.
Jaime managed to get there right on time, too. Cersei was alone. The Mountain had gone to fight the Hound, and Qyburn was dead. She was struggling through the castle alone, walking through the map room she had been so proud of all of last season when, out of the dust and the smoke, Jaime arrived. It was a miracle. Cersei burst into tears. After all that, Jaime was her hero, one last time.
But Cersei was never going to leave the city alive, even as Jaime grabbed her hand and began to lead her out of the castle. Daenerys and her fire were drawing even closer, and the city was collapsing all around them. Jaime followed Tyrion's instructions, believing it would help them escape the city, but in the end, both of Cersei's little brothers walked right into a trap. The dragon pit was already in tatters and about to collapse, and the exit, the only way out of the city, was caved in.
In the end, Cersei was killed by Tyrion and Jaime, but only because they had the best of intentions. It's not how anyone would have thought the prophecy would play out, but these things are never straightforward. Cersei begged Jaime not to let her die, but he didn't listen. They died in each other's arms as the walls collapsed around them.