Today, I scanned an email attachment and no virus was detected, but I got a virus. Never, ever open an attachment that is an .exe, even if it is from somebody you know.
Attachments are the primary way a virus is spread.
An attachment can hold a worm, which is a program that is spread from one computer to another. These programs use email to spread themselves quickly from one computer to the next. A worm can also be a virus and attach itself to other documents in your computer. The virus that infected you wasn't detected because your antivirus software wasn't updated. You need to make sure you update your virus-protection software on a regular basis.