XP is caused by mutations in genes responsible for nucleotide excision repair (NER). These mutations impair the body's ability to repair DNA damage caused by UV radiation. The NER pathway is crucial for correcting DNA lesions that can lead to skin cancer and other mutations. Key genes involved include XPA, XPC, and others identified in complementation groups A through G.