A hydrocele can develop before birth. Normally, the testicles descend from the developing baby's abdominal cavity into the scrotum. A sac accompanies each testicle, allowing fluid to surround the testicles. Usually, each sac closes and the fluid is absorbed.
Sometimes, the fluid remains after the sac closes (noncommunicating hydrocele). The fluid is usually absorbed gradually within the first year of life. But occasionally, the sac remains open (communicating hydrocele). The sac can change size or if the scrotal sac is compressed, fluid can flow back into the abdomen. Communicating hydroceles are often associated with inguinal hernia.
A hydrocele can develop as a result of injury or inflammation within the scrotum. Inflammation might be caused by an infection in the testicle or in the small, coiled tube at the back of each testicle (epididymitis).