The DNA of a virus is protected by a protein coat called a capsid. The capsid is made up of many individual protein subunits, which come together to form a protective shell around the viral genome. The capsid not only protects the viral DNA from damage, but also plays a critical role in the virus's ability to infect host cells.
In some viruses, the capsid may also be surrounded by an outer envelope, which is derived from the host cell's membrane and contains viral proteins that are involved in the infection process. The envelope can further protect the virus from environmental stresses, such as changes in temperature or pH.