Original: Smooth muscle fibers keep it close to the glans but make it highly elastic.
Simplified: The foreskin is attached to the penis by the frenulum, but it can move.