During fetal development in boys, the testicles (testes) form in the abdomen and migrate into the scrotum (the sac of skin below the penis). Undescended testicles happen when the testicles do not descend all the way to the scrotum before birth. This condition is also called cryptorchidism. Sometimes undescended testes do not migrate at all; other times, they stop somewhere along the way in the inguinal canals. Sometimes one testicle descends normally but the other does not. In boys who are born with normally descended testicles, one or both testicles may retract into the groin before adolescence; this is called acquired cryptorchidism or ascending testicles.
In order to produce sperm, testes need to be in the scrotum, which keeps them cooler than normal body temperature. Testes that are undescended at birth sometimes descend into the scrotum during early infancy. If the testes are left undescended for too long, they can be harmed by getting overheated, and they may not produce sperm normally or at all. In such cases, surgery is done to move the undescended testes to the scrotum.