How do You Get Computer Viruses?

Computer viruses may be obtained through several methods including opening attachments to emails from unknown senders, or visiting web sites which may contain embedded malware.