The testes are protected by a seven-layer covering. The last two layers comprise a pouch of skin called the scrotum, visible externally.
Spermatogenesis cannot occur at internal body temperature.
They require around 2-2.5 degrees celsius lower than the body temperature. When the outside temperature is low, the muscles contract pulling the scrotum up to warm the testes. When the outside temperature is high, the muscles lower the scrotum further down to cool down.