Most commonly viruses today use e-mail to spread however they have used one or more of the following methods to spread in the past.
Some viruses will load themselves onto any part of a writable removable drive as possible and spread from computer to computer as people use the removable drive.
A worm is a program similar to a virus that will exploit a vulnerability in an operating system or application that a computer user is running. The best defense against a worm is to have either a personal firewall on your system or be behind a corporate firewall. Another good defense is to update your system regularly. All you need to do to get a worm is to connect an unpatched computer to the internet or infected network when your computer does not have firewall protection.
Since worms spread by taking advantage of vulnerabilities in operating systems or application programs (remember from earlier discussion, vulnerabilities are software errors that allow some kind of unauthorized access when they are used or exploited). You do not need to do anthing special to get a worm except to connect to the internet or an infected network with a system that has vulnerabilities. There are several good defenses against worms.