Elk Cloner is the first known computer virus that has spread "in the wild," i.e., outside the computer system or lab in which it was written. It was written around 1982 by a 15-year-old high school student named Rich Skrenta for Apple II systems.
Elk Cloner spread by infecting the Apple II's operating system, stored on floppy disks. When the computer was booted from an infected floppy, a copy of the virus would automatically start. The virus would not normally alter the working of the computer, except from monitoring disk access. When an uninfected floppy was accessed, the virus would copy itself to the disk, thus infecting it, too, slowly spreading from floppy to floppy.
Like many of the early viruses, Elk Cloner did not cause any deliberate harm, although it could harm disks not containing the standard DOS image - it overwrote its reserved tracks regardless of the contents. Like many of the early viruses, however, it did cause annoyance: on every 50th booting the virus would display a short "poem", as follows:
Elk Cloner: The program with a personality It will get on all your disks It will infiltrate your chips Yes it's Cloner! It will stick to you like glue It will modify ram too Send in the Cloner!
Annoyance, in fact, was the reason for the virus's existence. Its 15-year-old author previously had the habit of giving out pirated computer games to his friends, but games modified such that they would stop working after a given number of games. This scheme guaranteed a high level of annoyance: by the time those friends grew to like the programs the programs would stop working, usually with some "humorous" message (at least as judged by their author). After a while those friends learned never to allow Skrenta near their disks. Then came Cloner, which could annoy friends without Skrenta physically gaining access to their disks.
According to contemporary reports, the virus was rather contagious, successfully infecting the floppies of most people Skrenta knew (including his math teacher), upsetting many of them (including said math teacher). Part of the "success," of course, was that people were not at all wary of the potential problem (virus infection could have been avoided by not inserting floppies into computers without hard-booting them before), nor were [virus scanner]s or cleaners available. The virus could still be removed, but it required an elaborate manual effort.