Most likely,its torsion of spermatic chord. It's easily treatable with rest, antibiotics and antiinflammatories.
Next Steps
Get medicines prescribed by a physician and have them as directed.
Health Tips
Avoid any jumping movements,like riding a bike for a week.