A whip or a cat o' nine tails was a device with a long slack end used as a punishment or a goad.
In 2268, James T. Kirk was impressed by Kloog's prowess with his whip while fighting against him. (TOS: "The Gamesters of Triskelion") Later that year, both Kirk and Spock were flogged with a cat o' nine tails by a Nazi guard. (TOS: "Patterns of Force") Also that year, upon attempting to enter to quarters of Dohlman Elaan, Kirk was told by a guard outside that "the Dohlman has promised I'll be whipped to death if I let Captain Kirk pass through that door." (TOS: "Elaan of Troyius")