The foreskin has protective, sensory, biomechanical, and immunological functions. Throughout life, the outer part of the foreskin protects the sensitive inner part of the foreskin and the glans from injury, abrasion, chafing, and infection. The foreskin keeps its mucosal tissue and the glans soft and moist so that it maintains sensitivity.
During sexual activity, the foreskin glides up and down over the glans, providing sensation from thousands of specialized nerve endings in the inner foreskin. Parts of the foreskin, including the frenulum (a narrow membrane on the underside of the foreskin) and the ridged band (the edge of the foreskin, between the inner and outer skin), are particularly important in sexual function. The foreskin also secretes immunological substances that fight infection, called lysozymes, and also produces natural lubricants, reducing the need for artificial lubricants during sex.