Originally viruses were grouped and named according to the disease they cause, even if they are not closely related. For example Hepatitis A is an RNA virus and Hepatitis B is a DNA virus, but they both cause liver disease. Nowadays, however, viruses are grouped by their shared characteristics in much the same way as plants and animals are.
All but one of the DNA virus families use double stranded DNA as their infectious 'code'. This double strand can be linear or joined into a circle. DNA is more stable than RNA and is less prone to rapid mutation, but it must be transcribed into RNA before the virus genes can produce the proteins that will help it to make more viruses.