From Wikipedia:
------------------------------------------
---------------------------
The cause is the prolonged sexual
stimulation of the erect penis
(intentional or unintentional), either by
direct or indirect contact, that does not
result in orgasm and ejaculation. This
can, in some circumstances, be a
consensual sexual act as part of erotic
sexual denial.
During arousal in a sexually mature male,
the parasympathetic nervous system
increases its inputs to the genital
tissues, resulting in increased blood flow
to the testicles and prostate areas. As
this happens, other fluid outflow muscles
constrict, causing less bodily fluid to
leave the area than enter, ensuring a high
enough regional blood pressure to allow a
sustained erection for penetration during
sexual intercourse.
If orgasm is not achieved, blood and
lymphatic fluid tend to pool, and the
blood becomes oxygen-deprived. The
technical term for this is vasocongestion.
It can be extremely painful, like a hit to
the testicles, but from the inside.
Some men may deprive themselves of an
orgasm purposely, to prolong sexual
activity, etc. Their sexual partner may
also request that they refrain from
ejaculation for a longer period to
increase their duration of sex (or mutual
satisfaction of both partners). If this is
the case, massaging the testicles or using
a vibrator on the testicles during the
prolonged sexual activity may prevent the
blood from pooling and actually prevent or
decrease the severity of blue balls. Some
men have also learned and practiced
methods prolonging ejaculation for a
stronger and more satisfying orgasm.[1]
Men with priapism or orchalgia may
experience an extreme, prolonged form of
blue balls, which may require medical
attention
------------------------------------------
---------------------------
http://en.wikipedia.org/
wiki/Blue_balls