It can be epididymitis or orchitis.
In cases of
hernia, a prominent bulge along with testicular pain is there and
in cases of kidney or ureteric stones, pain during micturition may also be there.
You can provide support to the scrotum by wearing an athletic supporter, apply ice to the scrotum, take warm baths if there are signs of inflammation, while lying down, place a rolled towel under your scrotum or try over-the-counter pain relievers, like acetaminophen or ibuprofen.