These were the earliest types of viruses developed, and remained relatively common in the wild until overtaken in 1998 by script and macro viruses .
More information is provided below.
Boot viruses hide in the boot code for a media device, such as a disk or CD, and automatically run when the media is booted, since boot programs are always the first code loaded from any device. These types of viruses proliferated on floppy disks and even CD's into the late 1990's, but aren't seen nearly as often these days with the decline in importance of transferable, bootable media. Program viruses can travel on media like a CD or across the net by email attachment. They hide in an apparently useful program and then run when the program is opened. They are often called trojan horses , after the hollow wooden horse containing soldiers that Ulysses and the Greeks gave to Minerva during the Trojan war, and from which the soldiers emerged later that night to open the gates of the city of Troy to the Greek armies, thereby causing the city's downfall.