People make all viruses. You can get a virus from your mother, father, brother, boss, or anyone else who gives you an infected program, and everyone would be oblivious to this fact until it was too late. First off, a Trojan horses is not virus. A Trojan horse is a program that appears, on the outside, to serve a useful purpose, provide entertainment, or some other facet which encourages the user to run it. But, like it's name implies, it will usually release a payload that can damage files or perhaps plant a virus on your computer.
Many computer viruses turn out to be hoaxes or myths.
First, don't open e-mail attachments from people you don't know or trust. If you do know them, ask whether or not you expected the email. If you're not sure, email them back and ask them whether or not they sent you this email and whether or not they made sure attachment was free of any viruses. Second, use virus detection software. This is your best defense other than diligence when it comes to opening infected e-mail attachments or corrupt programs.