The foreskin has three known functions: protective, sensory, and sexual.
During infancy, the foreskin is attached to the glans and protects it from urine, feces, and abrasions from diapers. Throughout life, the foreskin keeps the glans soft and moist and protects it from trauma and injury. Without this protection, the glans becomes dry, calloused, and desensitized from exposure and chafing.
Specialized nerve endings in the foreskin enhance sexual pleasure.
The foreskin may have functions not yet recognized or understood.