I have on and off mild pain in my testis recently. What do I do?

See your doc. Testicular pain should always be investigated by your doc. There are a great many things that can cause testicular pain - some are fairly benign while others can be serious. Most causes are very treatable so see your doc right away. Causes include kidney stones, prostate or epididymus infections, idiopathic orchalgia, or trauma.
Testicular pain. Testicular pain may be due to infections such as epidydimitis, varicocele, or torsion of testes. Need to get it checked quickly.
Possible... Any man with highly variable onset, intensity, duration, and interval of testicular pain on one side would alarm one to think about possible intermittent torsion although this condition has not been commonly detailed in testbook, but real. Its DX highly relies on professional alertness and judgment through detailed hx, not by scrotal us... So, talk with doc timely...