I agree with haidee I wouldnt delay in getting him to the vet,but is does sound like an infection,but as peekawho says he may need antibotics.Let us know what the vet says.
It's probably prostatitis. Its common, but he needs antibiotics.
I would take it to the vets it might be something simple like a urine infection, but it might be more serious i would get a vet to check it out just to be safe