Flagellation is the act of whipping (Latin flagellum, "whip") the human body. Specialised implements for it include rods, switches and the cat-o-nine-tails. Typically, whipping is performed on unwilling subjects as a punishment; however, flagellation can also be submitted to willingly, or performed on oneself, in religious or sadomasochistic contexts.
Flogging is an approximate synonym that was probably derived from flagellum in the British navy, where flogging was a common disciplinary measure that became associated with a seaman's manly disregard for pain. Aboard ships, knittles or the cat o' nine tails was used for severe punishment, while a rope's end or starter was used to administer the lightest discipline to sailors.