Cancer is caused by mutations in the DNA of cells. These mutations can be inherited or acquired throughout a person's life. Acquired mutations can result from exposure to various environmental factors such as carcinogens, radiation, and certain viruses. Genetic mutations can affect oncogenes and tumor suppressor genes, leading to the uncontrolled growth characteristic of cancer.