A somewhat polite term for masturbation
"I opened up the bathroom door and Billy was in there, you know... shaking his own hand..."