DNA mutations are fairly synonymous with cancer, but it’s not DNA mutations per se, rather it’s mutations in very specific DNA that encode for genes that are related to apoptosis (programmed cell death), cell survival, cell proliferation, the cell cycle, etc. These genes are called oncogenes
The p53 gene inhibits cell proliferation and is involved in cell-cycle checkpoints, apoptosis and maintaining the genome following DNA damage  
- Tumor suppression genes like p53 are absent in mice with cancer 
- p53 mutations correlate with decreases in apoptosis 
- Disrupting activators of p53 promotes tumour development 
- p53 mutations are common in tumours and are associated with advanced tumor stage and poor patient prognosis 
- p53 mutations correlate with short remissions and drug resistance following therapy in some cancers 
Mutations in other genes can lead to cancer as well:
- Mutations in the gene encoding protein tyrosine kinase RET can leave the gene stuck in the ‘on’ position, resulting in unregulated cell growth. Mutations are an early event of papillary thyroid carcinoma and are necessary to the cancer to develop 
- The Fas/CD95 receptor controls cell numbers in the immune system and inducing apoptosis in immune cells when numbers get too high. Disruption in this pathway can lead to cancers in the immune system 
- PTEN (in the AMPK pathway) is a tumour
suppressor gene that also inhibits PI3K (in the mTOR pathway), which promotes
cell growth, proliferation and survival.
Mutations in PTEN are common in tumours 
Infections are estimated to contribute to 17.8% of all cancers worldwide (26.3% in developing and 7.7% in developed countries). H. pylori (bacteria) 5.5%, human papilloma virus (HPV) 5.2%, hepatitis B and C viruses (HBV, HBC) 4.9%, Epstein-Barr virus (EBV) 1%, HIV and herpes virus 0.9% (~12% from virus). The contribution of viral infections can be as high as 100% of cervical cancer from HPV and as low as 0.4% of liver cancers from liver flukes .
A virus capable of causing cancer is called an oncovirus. Most viruses inject their RNA into cells, which makes the infected cell replicate the virus. Oncoviruses tend to replicate in a different way by first making the infected cell reverse transcribe their RNA into DNA, which then gets incorporated in the infected cell’s genome and is used to replicate the virus. A virus that replicates in this manner is called a retrovirus.
Oncoviruses have developed a number of oncogenes/oncoproteins for their replication that promote cell division and proliferation and influence genes such as p53 and NFκB  . Cancer can be an accidental side effect of these viral replication strategies. These can include:
- The E1A oncoprotein that influences the cell cycle by inducing G0 cells (cells not going through cell division) enter the S phase (DNA replication) because viruses need cells to be in the S phase for replication. Forcing cells into the S phase without cell cycle checkpoints and apoptosis increases the chance of DNA mutations  
- The LMP1 oncoprotein (from the EBV), that mimics a growth factor receptor and a TNF receptor, and so can promote cell proliferation and NFκB expression 
- A growth factor (from the poxvirus), similar to epidermal growth factor, is secrete by infected cells and stimulates proliferation in neighboring cells 
Viral oncoproteins are like an alternative to DNA mutations in regards to initiating cancer. There is often a long latent period between the initial viral infection and tumour development and developing a viral related cancer generally requires one to be immunocompromised .
DNA is continually damaged, but there are DNA repair mechanisms to protect against DNA mutations. The problem arises when the rate of DNA damage exceeds the rate of repair. Replicating damaged DNA can lead to DNA mutations or apoptosis. DNA mutations can result in underexpression (sometimes no expression) or overexpression of genes .
Genetic mutations/alterations that promote cell growth, proliferation and survival may lead to a cell that grows and divides rapidly resulting in a tumour. Initially tumour cells (the cells that make up a tumour) are not metastatic/malignant. To become metastatic a tumour cell needs to develop further DNA mutations to survive in the bloodstream (block apoptosis) and invade other tissues. Once a tumour cell becomes metastatic and then invades other tissues every tumour cell of the new tumour has invasive and metastatic abilities  .
Cancer treatments like chemotherapy and radiation therapy work by overwhelming the capacity of the cell to repair DNA, resulting in cell death. Tumour cells are most vulnerable because of their high rate of cell division*. . But some anti-apoptotic mutations can select for chemoresistant cells. Also if chemoresistant cells survive after chemotherapy and the tumour grows back then all the tumour cells will be chemoresistant 
* A common side effect is that other non-cancerous but rapidly dividing cells such as stem cells in the bone marrow are also highly affected.
** When cells divide telomeres shorten. Tumour cells up-regulate the enzyme telomerase (synthesises telomeres), which kind of makes tumour cells immortal.