To be perfectly honest, nobody knows what exactly causes prostatitis. Most doctors are not as concerned with prostatitis as they are with prostate cancer and therefore do not concentrate so much on it. This is because most of the time prostatitis is generally benign, it is in fact referred to as BPH or Benign Prostate Hyperplasia or Hypertrophy.
The only thing that is known is the mechanism by which the prostate gland swells up. The prostate is the gland that makes the fluid that makes up the majority of semen. It is the whitish fluid that both nourishes as well as works as an antibacterial agent, keeping the sperm alive when it is outside the testes.
This fluid is made by small tubes within the prostate called the acini. The acini are very small, and the whole of the prostate is filled with them. Each of these tubes make a very small amount of seminal fluid, but together they make quite a bit.
When these tubes get infected, the body, in reaction to the bacteria or fungi coats them with a form of calcium that forms a hard ball around the microbe and isolates the infection. The problem is that once this coating is done, the tube is effectively blocked. The blocking of the tube however does not stop it from continuing to make the seminal fluid.
While a few of these tubes blocking may not be an issue, when enough of them block, they can swell up to such proportions that they will cause the prostate to swell, bringing with it all the traditional symptoms of prostatitis.
This swelling can affect the whole of the prostate, or only one portion, depending on how much the infection has spread. What exactly causes this infection is not known, and there are no known bacterial or fungal agents. All the microbes found in tests are generally benign ones that are known to inhabit the body, or may be e coli bacteria that is once again not as uncommon as is believed.
Most doctors just advise hygiene, and keeping the genital area safe from injury, as injury too can cause blockage of the acini. Wearing clean underwear at all times is important, as is clean sex. Unprotected sex, even with the same partner when they have some infection of their reproductive system can result in you getting an infection in your prostate. In fact some doctors even believe that swimming in dirty water can cause prostatitis.