Latex allergy occurs when the body's immune system reacts to proteins found in natural rubber latex.