Testicular torsion occurs normally between the ages of 12 and 16 but can occur even before birth and at any age. It happens when a testicle twists, twisting the spermatic cord. The spermatic cord brings blood to the testicle and scrotum. The lack of blood flow causes sudden and severe pain and swelling of the testicle. Testicular torsion generally requires emergency surgery to reestablish the blood flow to the testicle.