25 years of PC viruses and copy protection
In January 1986, the first virus that infected IBM-compatible PCs was discovered. "Brain" immortalised itself in the boot sector of floppy disks in DOS format. According to Wikipedia, quoting an interview in Time magazine, the Brain virus was written by two brothers in Pakistan to protect their medical software from piracy.
Almost 20 years later, media giant Sony BMG deployed a copy protection mechanism that secretly embedded itself in every system which played a copy-protected CD. It used rootkit techniques to avoid being discovered by the system or user. Various copycats subsequently used this camouflage technique, for instance, to hide from anti-virus software. Today, the copy protection mechanism is itself classified as malware and commonly referred to as "the Sony rootkit".
However, Brain wasn't the first computer virus. This dubious honour is generally awarded to the Elk Cloner virus, which infected the boot sector of Apple II systems. Almost all contemporary malware specialises on the Windows platform. Its main purposes are online banking fraud and the creation of botnets for spamming and distributed denial-of-service (DDoS) attacks. While such malware no longer involves classic viruses which spread by infecting files or storage media, the name virus has, over the years, become a commonplace generic term for all kinds of computer malware.
An exception are spyware programs which target specific information or users. Such malware is tailored to the required platform, which may also be Linux or Mac OS X. Another special case are sabotage programs such as Stuxnet.