An eponym based on the name of Leopold von Sacher-Masoch, an Austrian novelist who was fascinated by people who got sexual pleasure from being hurt. He wrote about it in many of his books, and his name was first used to describe it in 1893, two years before he died.
Masochism includes sexual pleasure from pain, humiliation, discipline and submission. People who gain sexual pleasure from dolling out such punishments are called sadists (another eponym), and they are often lumped together as sadomasochism or BDSM; these node have much more information.