Hello,
Thanks for asking your questions at DoctorSpring.
It sounds like you have orchitis or inflammation/infection of your testicles. This can either be a bacterial infection such as gonorrhea or chlamydia which are sexually transmitted diseases. Otherwise, it could be mumps orchitis as what is caused by a viral infection ~ however this is less likely as it is more common in children than adults.
You will need a course of antibiotics to rid the infection if it is a bacterial cause. Some of the tests you will need upon arrival at the hospital or medical facility are blood tests, urine tests including culture and sensitivity, urethral smears for gonococcal and chamydial organisms, and possibly a testicular ultrasound. For your age I recommend ciprofloxacin and doxycycline or azithromycin.
This condition can resolve on its own in about 1 week, but you can avoid complications if you get treated early with antibiotics. Complications include testicular atrophy or development of a hydrocele or pyocele (fluid/pus filled sac). Make an appointment with your local physician (or mini-clinic) as soon as possible to initiate treatment.
I hope this helps. Please ask any follow up questions if necessary. Take care.