S&M is taking erotic pleasure in giving (sadism) or receiving (masochism) intense sensation — pain included — inside a consented frame.
Sadism and masochism are two ends of the same current: one person gets off on delivering sensation, the other on taking it. Often that sensation is pain — a slap, a bite, a cane — but the aim isn't injury, it's the charge that runs through a body when the intensity is dialed exactly where both people want it. Inside BDSM, S&M is the sensation-play half, distinct from the bondage, the roles, and the psychological power games it usually travels with.
The two words arrived as diagnoses, not as fun. A 19th-century psychiatrist bolted them into a catalogue of "perversions," and for a century after that, wanting to be spanked could get you labelled sick. That has changed on paper: modern psychiatry now separates simply having the interest from having a disorder, and the deciding factor is whether it harms someone who didn't sign up. The line between S&M and abuse isn't the pain. It's the consent.
Which is why kink communities are, quietly, obsessive about the paperwork of desire. Before anything happens there's negotiation — what's on the table, what's off, a safeword that stops everything mid-scene. Two mottos carry the weight: "safe, sane and consensual" and its more honest cousin "risk-aware consensual kink," which admits that nothing intense is ever fully safe and asks you to know the risk anyway. Done right, an S&M scene is one of the most negotiated things two adults can do to each other. The bruise is the easy part.