In all honesty, it doesn't mean anything.
I've heard guys say it, and we joke around about it between guys, but it's really just an imaginary and fictional concept.
Medically, "blue balls" is "epiditimitis" or; the inflammation of the epiditimus. This happens when there's an infection, or in the event of some physical injury (such as being hit in the area).
If a guy doesn't experience release, two things start to happen:
1. The testes lower their rate of sperm production. The production of sperm is a resource intensive task for the body. It requires a lot of protein, sugar, and antibiotics. The body doesn't exactly want to invest all those calories into something that's never going to be used. So when it knows it pretty much has sperm to spare, it redirects the availability of those resources to other areas of the body as needed. (some trivia knowledge: this is why ancient tribal cultures did not allow sex or masturbation at least 3 days prior to hunting; and why boxers and professional athletes are not allowed to have sex 2 days prior to a game)
2. The body starts to break-down "old" or "aged" sperm. When sperm is more than 28 days old, the body literally decomposes it into its most basic parts, and begins the formation of new sperm. Old sperm has a high risk of mutations, which isn't exactly good news for any potential offspring. So the "balls" can never really "fill up". And when they get close, there's no "wet dream" or need to release. The body takes care of itself.
There is no actual pain caused by lack of release. If a guy says so, he's lying in a desperate attempt to make you feel guilty. All he's feeling is frustration. Perhaps if he was teased, aroused, turned on, and lead to believe he would release, but then didn't, he would be feeling sexual frustration; but not pain.
Of course, the important thing to take away is the message he's probably trying to communicate; that he's sexually frustrated. If it's sexual release he's looking for and not getting, he'll just masturbate. If it's sexual intimacy he's looking for and not getting, he'll just find someone else. The only person he has to blame for not having his wants met is himself. Though expression of his frustration can be taken as him trying to communicate; "I'm not getting the degree of sexual intimacy I desire, and I really don't want to just go find someone else if I can find it with you" (of course, if he can't, then he'll just go find someone else)
The other thing that happens when there's no sexual release is that the body shoots down its libido. In a last-resort effort to cope with sexual frustration, the body eliminates feelings of frustration; if not by release and satisfaction of desire, then by removal of desire!
Now, not too many guys would be okay with that ever happening to them. So instead of voluntary chastity, they would just get up and leave; and find the sexual intimacy they want with someone else. Unless they have some fetish.