Some people get sexual satisfaction from receiving pain; some get sexual satisfaction from giving pain (this one is called sadism).
I'm pretty cerebral and I get lost in my own head sometimes, so if I'm lashed with a bit of pain, it can jar me from becoming lost in myself - and if sex is involved, can tip me into a spectacular orgasm :) But if you go too hard on the pain - you'll hurt me, I'll cry and orgasms will be a long way off! So for me, there's a bit of fine line. And if you don't listen and react to me, there are no second chances.
For other people, they may not have limits on their pain threshold. They may love being pushed further and further each time. They may adore losing all thoughts and just becoming lost in the euphoria that the pain gives them.
But to know how much pain someone likes to receive/inflict, you need a lot of communication. Maybe not so much talking about it before you start, although that's probably a good thing, but also during the sex play. You have to know how to communicate, or how to see, when the limits are reached.
Sadists are usually a Dominant in a BDSM relationship (although not all Doms/Dommes are sadists). But sadists can also just be bastards who abuse a relationship, or abuse a stranger.
If you're playing with a sadist, I think it's really important that the communication is excellent. With pain, what's acceptable for one, may not work for another and both of you need to know that, and work out limits, expectations and care. If you're really going to be hurt, make sure you have plans for your care afterwards and for unexpected emergencies.
Let's have a look at Tiffany Reisz's book, The Saint or the whole Original Sinners series, really. Soren is a sadist, and also a priest. Eleanor is a young girl in his parish, who at the start of the book is not legal. I read this book, and I loved the nuances in it. I thought it was clever, and a really interesting way to explore sadism and Dominance, which developed into a highly complex, adult relationship.
But have a look on Goodreads or Amazon at the readers' reviews. On Amazon, 82% of people gave it 5 stars and loved it. But there are a couple of low starred reviews with people commenting on the characters' lack of loyalty to each other, and others appalled by the violence in the sex. Some are queasy reading the sex scenes. In other reviews, the reader felt Soren groomed Eleanor and likened it to paedophilia. Others say that Reisz pushed the sex too far. There's a wide interpretation of what people like and find acceptable - even though I imagine only people who are fans of erotic romance would chose to read this book.
With pain, like so much about sex, everyone has different limits, expectations and experiences.