Sometimes DNA damage is caused by an infection with a virus. A virus causes disease by inserting its DNA into the DNA of the person that it has infected. Viruses cause a whole range of diseases from the common cold to AIDS.
Sometimes infection can be caused by a bacterium. Most cases of stomach cancer are caused by infection with a bacterium called Helicobacter pylori. The infection can cause cell changes that may lead to cancer.