Original: The act might be sexual for both, either, or neither.
Simplified: Masochists get pleasure from being tortured, hurt, or humiliated.