XP is caused by mutations in genes involved in the nucleotide excision repair (NER) pathway, which is responsible for repairing DNA damage induced by UV light. There are several complementation groups (XPA through XPG) each associated with mutations in different genes of the NER pathway. These mutations hinder the body's ability to repair UV-induced DNA damage, leading to increased mutation rates and a higher likelihood of cancer development.