Once the viral genetic material is inside the cell, viral enzymes break down host DNA, so that the host cell can no longer carry on its normal cellular processes. The host cell now has no “choice” but to follow the directions encoded in the viral genetic material, and these directions say: "make more viruses."
The DNA filaments of DNA viruses transcribe themselves into mRNA, and, in their turn, these molecules head straight for the ribosomes of the host cells. Ribosomes are the “protein factories”, and the mRNA molecules represent the “instructions” to make proteins. The ribosomes of the host cell start churning out viral proteins. Some of these viral proteins are actually the enzymes mentioned above, which destroy host cell DNA. Indeed, in some cases, destruction of host cell DNA occurs only after some of the viral genetic material is translated and transcribed into proteins. In other cases, enzymes get injected into the host cell along with the genetic material and start degrading host DNA immediately.

click to enlarge
Retroviruses, like
HIV, are slightly different in that their genetic material is not DNA, but RNA. The RNA gets injected into the host cell and this must be transcribed into DNA with the help of an enzyme called reverse transcriptase (which is encoded for by the viral genome or injected along with the RNA filaments). The viral DNA is then re-transcribed into RNA in order to be “read” by the ribosomes to make proteins.