The epididymis is a coiled tube located in the back of each testicle. Straightened out, it would be about 20 feet (6 meters) in length. It's a storage and delivery system for sperm. Its length allows not only more sperm to be stored there, it also gives them time to mature.
It's possible for the epididymis to get inflamed. Since the epididymis connects to the testicle, this can lead to a form of testicular inflammation known as epididymitis. The most common cause is bacterial infection. The bacteria don't reach the epididymis through the blood; rather, bacteria usually enter through the urethra and work their way back.
The bacteria generally come from one of two different sources: STDs, such as gonorrhea or chlamydia; and coliforms, bacteria that live in the intestines. (There are also less common sources of inflammation, such as the heart drug amiodarone, and certain viral infections, such as mumps.)
When the epididymis becomes inflamed, the testicles commonly get slightly swollen and red. The condition can be very painful, especially during ejaculation or even bowel movements. You may feel the frequent need to urinate, or see blood in your semen. You may even periodically feel chills.
The good news is that antibiotics usually do the trick. However, more serious cases may require surgery in order to remove part or all of the epididymis. The longer you wait to see a doctor, the more serious your treatment is likely to be, so don't delay.