Thanks for your query.Based on the facts that you have posted it appears that you have developed infection of the testicle secondary to UTI(Orchitis
Please get your routine urine test and urine culture done to find out the organisms causing this infection and antibiotics to which they are sensitive to.
Please take broad spectrum antibiotics along with urinary antiseptic like Nitrofurantoin
and anti inflammatory medications like Diclofenac
twice daily.twice daily and urine alkaliser thrice daily and later on switch on to appropriate antibiotics as per culture report.
Get the prescription of medicines from your family Physician.
Ensure to drink more water.To keep your urine dilute This will help to control dysuria
Please ote that Orchitis takes long time to get cured hence you need to take medicines at least for one month.