Tumor heterogeneity arises through various mechanisms, including genetic mutations, epigenetic modifications, and microenvironmental factors. Genetic mutations can occur randomly or be induced by carcinogens, leading to diverse cell populations. Epigenetic modifications, such as DNA methylation and histone modification, can also create variability. Additionally, the tumor microenvironment, which includes factors like hypoxia, immune cells, and nutrient availability, can influence tumor cell behavior and contribute to heterogeneity.