Genetic factors play a crucial role in cancer development. Mutations in certain genes, such as oncogenes and tumor suppressor genes, can drive the transformation of normal cells into cancerous cells. For instance, mutations in the TP53 gene are found in many types of cancers. These mutations can be inherited or acquired due to environmental exposure or errors in DNA replication.