Genetics play a crucial role in cancer. Some people inherit genetic mutations that increase their risk of certain cancers. For instance, mutations in the BRCA1 and BRCA2 genes are known to significantly increase the risk of breast and ovarian cancer. Genetic testing and counseling can help identify individuals at higher risk, allowing for earlier interventions.