Epididymitis typically arises from sexually transmitted infections (STIs), particularly those caused by bacteria such as gonorrhea and chlamydia. However, other bacterial infections can also lead to epididymitis. Less commonly, bacteria like Brucella or tuberculosis can be causative agents. In childhood, it may appear as a complication of viral infections. In some cases, the infection can spread to the testis on the same side, causing epididymo-orchitis (inflammation of the testis and epididymis).