Nathaniel Hawthorne's novel The Scarlet Letter (1850) describes the plight of Hester Prynne, who has been forced to wear a scarlet letter A (for "adultery") on her dress as a sign of shame. She also had to stand on the scaffold for three hours as a form of public humiliation. The novel was set in 17th century Salem, Massachusetts, specifically the years 1642 to 1649. Hester Prynne had been married, but her long-lost husband was thought to have been lost at sea, and she never exposed the identity of the man involved in her affair, nor whether or not he was marrried.
Is this kind of punishment true to life?
We can't say for sure how they punished people for "adultery" as early as 1642. The earliest reference we have found is in a law passed in 1694 in The Charters and General Laws of the Colony and Province of Massachusetts Bay (Published by order of the General Court, Boston, 1814), pages 277-278.
The 1694 act [Chapter XXVIII] reads: "[I]f any man be found in bed with another man's wife, the man and woman so offending, being therof convicted, shall be severely whipt, not exceeding thirty stripes... And if any man shall commit adultery, the man and woman that shall be convicted ... shall be set upon the gallows by the space of an hour, with a rope about their neck, and the other end cast over the gallows, and in the way from thence to the common gaol shall be severely whipt, not exceeding forty stripes each; also every person and persons so offending shall forever after wear a capital A of two inches long and proportional bigness, cut out in cloth of a contrary colour to their cloaths, and sewed upon their upper garments, on the outside of their arm, or on their back, in open view..." (If they didn't wear the capital A, they would be publicly whipped, not exceeding 15 stripes.)
In 1695, a similar punishment was prescribed for those convicted of cohabiting with someone to whom they were not legally married. Furthermore, persons convicted of incest, after the requisite shaming and whipping, had to wear the letter I on their clothing forever.
We may speculate on how a Hester Prynne would have been treated under the conventions of Colonial justice in the 1640s, but her punishment in Hawthorne's novel follows very closely, if not exactly, the law passed in 1694.