Second Battle of Winterfell

The Second Battle of Winterfell, also known as the Battle of the Bastards, is a battle late in the War of the Five Kings in which Jon Snow and Sansa Stark retake Winterfell from Lord Ramsay Bolton, the Warden of the North, and restore House Stark's rule over the North in defiance of House Lannister and the Iron Throne.

It is depicted in the eponymous episode, "Battle of the Bastards".

Prelude
"A monster has taken our home and our brother. We have to go back to Winterfell and save them both!"

- Sansa Stark to Jon Snow

With the death of Robb Stark and most of his bannermen during the Red Wedding, House Bolton is named the new ruling Great House of the North by House Lannister. However, to cement their hold on the North following the murders of Joffrey Baratheon and Tywin Lannister, they betray the Lannisters and secure a marriage alliance through Lord Petyr Baelish between Sansa Stark, formerly the Lannisters' hostage, and Ramsay Bolton, Lord Roose Bolton's recently-legitimized bastard son. With help from the Boltons' prisoner, Theon Greyjoy, Sansa escapes her home during Stannis Baratheon's ill-fated attack on the castle and flees to Castle Black with Brienne of Tarth and Podrick Payne, where she reunites with her bastard half-brother, Jon Snow, who was on the verge of leaving the Night's Watch following his death and resurrection.

With Sansa's escape and Roose Bolton having recently sired a son with his new wife, Walda Bolton, Ramsay's position as Roose's heir is left in doubt. In order to secure his position, Ramsay murders Roose and has his stepmother and newborn half-brother mauled to death by his hounds, making him the new head of House Bolton, Lord of the Dreadfort, Lord of Winterfell and Warden of the North.

Sansa urges Jon to help her retake Winterfell from the Boltons. Jon, wary from fighting, is reluctant at first, but agrees when they receive a letter from Ramsay, revealing he has killed his father and is holding their brother, Rickon Stark, hostage, and demanding Sansa's return on threat of murdering the wildlings and Rickon, before having Sansa gang-raped, and Jon himself mutilated and killed.

Raising an army
"There are more than three other houses in the North: Glover, Mormont, Cerwyn, Mazin, Hornwood. Two dozen more. Together they equal all the others. We can start small and build."

- Jon Snow

With the Karstarks and Umbers having declared for Ramsay due to their anger at Robb and Jon, respectively, Jon and Sansa are forced to recruit the meager forces of the minor Houses to aid them. They are successful in persuading the Free Folk, House Mazin, House Hornwood, and House Mormont to join them, while Robett Glover, head of House Glover, refuses to declare for them, citing both his hatred for the wildlings and his anger at Robb for having failed to protect them from Balon Greyjoy's invasion of the North. Sansa sends Brienne to the Riverlands to treat with her great-uncle, Brynden Tully, who is under siege at Riverrun. Unfortunately, Brynden refuses to leave his home and is later killed when the castle falls to House Frey and House Lannister. Brienne and Podrick are able to escape through the river.

After only being able to recruit a small number of minor houses, they are still heavily outnumbered, Jon is adamant that they attack Winterfell as soon as possible to prevent Ramsay from gathering more men or the weather turning against them, like it did for Stannis Baratheon. Sansa, however disagrees, instead opting to try and recruit more houses. When Jon refuses to listen to her, Sansa secretly writes a letter calling for help without telling Jon.

The Battle
"Thousands of men don't need to die. Only one of us."

- Jon Snow to Ramsay Bolton.

In the books
In the A Song of Ice and Fire novels, no such battle has taken place yet. The fifth and most recent novel, A Dance with Dragons, ends in the first stages of Stannis Baratheon's attack on Winterfell. Given that season six onward is based on an outline of what will happen in future novels, the battle, or a different version of it, rather, may take place in either The Winds of Winter or A Dream of Spring.