I think what may be tripping you up here is the vaguess of terms like "pleasure" and "enjoyment," which you seem to treat not only as equivalent, but also as univocal in their reference.
There are lots and lots of different kinds of pleasures: sexual, gustatory, aesthetic, and so on. There are lots and lots of enjoyments: some are pleasures, and others have to do with doing things we like (even when they are not accompanied by pleasant sensation--think of playing tennis when your knee hurts, but you are in a really great game and playing well.
So, one can have one kind of pleasure even when one is undergoing a different kind to pain. One can have one kind of enjoyment even when is undergoing another kind of suffering. A masochist (always measured by someone else's standard of what counts as a "healthy" or "wholesome" kind of enjoyment, mind you!) is thus one who has a certain kind of pleasure or enjoyment that is somehow linked to their also being in a certain (other) kind of pain or suffering. Nothing contradictory here!