sir iam 19yrs old iam having swelling on my left testis its having painful sensatios y and wats the reason for this ??

and a thng this swelling will stays foe 2 weeks and goes off again it comes back when i do sex .

so wats this symptom plzz give me the reason....

iam feeling very uncomfortable