Walk of atonement

"A sinner comes before you, Cersei of House Lannister. Mother to His Grace, King Tommen, widow of His Grace, King Robert. She has committed the acts of falsehood and fornication. She has confessed her sins, and begged for forgiveness. To demonstrate her repentance, she will cast aside all pride, all artifice, and present herself as the gods made her... to you, the good people of this city. She comes before you with a solemn heart, shorn of secrets, naked before the eyes of gods and men, to make her walk of atonement."

- The High Sparrow to the people of King's Landing

A walk of atonement is a public ritual of punishment and penance in the Faith of the Seven. It demands a confessed sinner to walk a certain distance stripped of all clothing, exposed to the eyes and jeers of the population.

Season 5
After being caught at a brothel in the middle of a session of blasphemous sexual roleplay, the High Septon is trapped by a group of Sparrows, stripped of all his clothes and forced to walk naked through the streets of King's Landing, while one of the Sparrows publicly names him a sinner and beats his hands to keep him from covering his genitalia.

After a time imprisoned by the Faith of the Seven, Queen Cersei confesses to having committed adultery with her cousin Ser Lancel Lannister, who had joined the Faith Militant and accused her of fornication, regicide, and incest. The High Sparrow reveals she will still be tried for the two other charges she denies while allowing her to return to the Red Keep only if she performs a walk of atonement as penance for her confessed sin. Cersei's hair is cut short and then she's presented to the population of King's Landing so they will bear witness to her confession and penitence. She's stripped of her clothing and made to walk from the Great Sept of Baelor to the Red Keep, escorted by members of the Faith Militant, who keep away the leering and jeering crowds who have gathered to see her shame and take the chance to insult a Queen. As she walks, Septa Unella accompanies her crying out "Shame!" repeatedly while ringing a bell to attract the attention of the population.

In the books
In the A Song of Ice and Fire novels, it seems walks of atonement are civil punishments reserved to publicly shame women accused of adultery or whoring. It also serves as a means of degrading these woman and stripping them of whatever pride or power they might hold. The novels mention only two people who had to go through this humiliating punishment: Tytos Lannister's mistress and Cersei.

Tywin Lannister forced his father's mistress into a walk of atonement after Lord Tytos died. While it is common for widowed lords to take lowborn women as bedwarmers, Tytos's mistress - a woman scarcely one step above a whore - had come to dominate him utterly, being seated beside him in the hall, showered with gifts and honors, even being asked her views on matters of state. She came to steal from him, order the household knights about, dismiss servants and help herself to the jewelry of the late Lady Jeyne, Tytos's wife. She grew so influential that it was said about Lannisport that any man who wished for his petition to be heard should kneel before her and speak loudly to her lap, for Lord Tytos's ear was between his lady's legs.

Lord Tytos died of a heart attack while climbing stairs to see her. The first thing Tywin did on his return from King's Landing was to expel the mistress from Casterly Rock. All the self-seekers who had named themselves her friends and cultivated her favor abandoned her. The silks and velvets Tytos had lavished on her and the jewelry she had taken for herself was stripped from her. Tywin had her stripped and sent forth naked to walk through the streets of Lannisport to the docks for a fortnight, telling everyone she met in the way she was a thief and a whore. Though no man laid a hand on her, that walk spelled the end of her power. Cersei was too young to witness the spectacle herself, but heard the stories from washerwomen and guardsmen who had been there.

Although Kevan has disapproved with Cersei's deeds (especially her incestuous affair with Jaime, spoiling Joffrey and her poor conduct as the Queen Regent), he does not gloat at Cersei, but feels sorry for her public humiliation. He muses sadly that his brother never dreamed that the same degrading punishment he gave his father's mistress would be imposed on his own daughter.

In the novels, when Cersei is shorn, the septas remove all of her body hair - her eyebrows, pubic hair, even scraping the rest of her body. They shave her head completely bald. In the TV episode, the septas prominently produce a razor blade as if they are going to shave her, but then curiously do not use it at all. One septa separately picks up a pair of shears, and cuts her luxurious long golden hair off - but crops it close to her head, instead of shaving her bald entirely. In her subsequent nude scenes the rest of her body hair isn't shaved.

George R.R. Martin has stated that Cersei's walk of atonement is loosely based on what happened to Jane Shore, the mistress of King Edward IV of England (who, like Robert Baratheon, was a great warrior who won the crown on the battlefield in his youth, but became fat and ill-suited to rule in later life). After Edward IV died his brother Richard III usurped the throne ahead of his nephews. He deeply resented Jane, so he had her arrested and made her perform a penance walk, a common punishment for harlotry. Jane Shore did not perform the penance walk naked, however, but had to walk barefoot through the streets of London wearing only her kirtle (petticoat), which given the times was still said to have gained significant male attention (the main source of the humiliation was that this was a punishment normally meted out to harlots). Martin has said that the Wars of the Roses were one of the major inspirations for his novels: the conflict was between the Yorks and Lancasters, while in Westeros the conflict is between the Starks and Lannisters (clearly named after the real families).