Flagellation, also known by its less fancy versions as flogging and whipping, is an ancient form of punishment much practised in the past. It involved stripping a victim (male or female) of their clothes and then tying them to a tree or some other handy object. They would then be whipped by a fat bloke in dirty trousers for a prescribed number of strokes. Sometimes this method of punishment was used for the purposes of execution. When used this way, a victim would be literally flogged to death. However, this could often result in a coronary by the person administering the sentence and was also a slow way of killing someone.
There was also a religious angle to flagellation. Jesus was said to have been flogged before his crucifixion and was often shown in paintings getting this treatment from Roman soldiers. Other saints followed Jesus down this path, often insisting they receive a thorough lashing before undergoing their martyrdom under what ever fiendish methods of killing were in store for them. If they didn't get it, the saints would flog themselves. This whip-yourself-stupid is a form of physical harm, dressed up as an act of piety/desperation. It has featured in Christianity, Shiite Islam. It is still carried on in public and is said to cure men of 'impure thoughts' (read - sex) and make them better people. Those who liked to whip themselves and others included Marquis de Sade, British Prime Minister William Gladstone and that blond priest who does this in Dan Brown's book/film the Da Vinci Code.
Flagellation as Punishment
Flagellation or, to give it the more vernacular term, flogging was a regular method of punishment for everyone from criminals to slaves. There was 'soft whipping' (across the back) or 'hard whipping' where the outcome was usually death. This was a bit like the difference between corporal and capital punishment. The hard whips used contained sharp spikes made of bone or metal to in effect, strip the victim's skin off their body.
Flagellation wasn't always restricted for the 'lower orders'. King Henry II of England had to agree to be whipped at Canterbury Cathedral as part of his penance in 'inspiring' the murder of Archbishop Thomas Beckett. Henry was unable to wriggle out of this as the Papacy insisted and as a church organisation, the catholic clergy was exempt from punishment by the secular authorities.
Self Flagellation against Masturbation
The expression 'to self flagellate' is normally said of people who self-blame themselves to excess. Like self-chastisement. Whipping yourself, or if no whips were handy, wearing itchy underwear were to mortify the flesh in punishment for lustful thoughts. And if that went beyond thoughts and saw hands yanking or clawing at their genitalia, then extra flogging was recommended. If you really wanted to lay of the pain, rubbing salt into a whipped back or the groin area (for both sexes) was regarded as the ultimate.
Notorious self-flagellators included St. Jerome who translated the Bible into faulty Latin, his friend St. Augustine and a large number of popes. For the extreme Catholic traditionalists of the Opus Dei, self-strapping was required as proof of piety.
This love of making your body a bloody pulp was practised by the Protestant preacher Martin Luther. His great rival John Calvin disapproved administering torture on yourself but liked administering to others. Which brings into the story of flagellation, the great whipper himself: Marquis de Sade.
Flagellation for Fun
It was the good French noble who first alerted everyone that flagellation could be good fun for those who dished it out and those who took it. Sade was able to do both. His recommendations on what to do in his great book whilst imprisoned inside the Bastille. This 18th century classic is titled in English, 'My Ideas of a Whip Round and Thoughts on Higher Education' (French title: Mes idées de coups de fouet et réflexions sur l'enseignement supérieur) was smuggled out on silk loo paper (being an aristocrat had some access to luxuries). It became highly influential, especially in the British 'Public Schools' system. Many an English lord had his bottom thoroughly flogged which resulted in the distinctive 'red flush' seen in so many contemporary paintings of them at the time.
Today flagellation is very big business. There are even songs by Madonna celebrating her own chastisement in the hands of Warren Beatty for the song Hanky Panky. However, her praise for self abuse was topped by Devo's song Whip It. Many did.