... even done properly, I wouldn't consider orgasm denial a punishment. I would consider a warm enema held in place by a butt plug to be punishment, but orgasm denial hardly seems worth the time or the effort unless you have a lot of time and effort to put into it.
To answer your question: Orgasm denial is either repeatedly bringing someone to the point of orgasm and then not letting them have it, teasing them over and over again and working them into a higher and higher point of stimulation each time or it is simply denying them sexual gratification of any kind.
The problem I have with orgasm denial as a punishment is, in example one, the build-up is so nice and sexually pleasing that the orgasm becomes a secondary concern and is not motivational as a punishment at all. In example two, unless I have another outlet for my sexual drive, denying my partner her gratification is also denying myself mine. And to me, that is not punishment. At least not JUST to her.