When you open an email attachment, you risk it consisting of an executable file which contains a virus (or other malware).
Bonus tip Edit
The best way to defend yourself from malware in email attachments is to make sure you know who sent you the attachment. If a stranger sends you an email attachment, they should not expect you to open an email attachment and it is quite likely that it is a trick.
This advice is totally unreliable, since in many cases, the virus sends itself to everyone in the host's email client's address book, including their close friends and relatives! You think your friend sent you this file, but it is actually the virus sending itself without their knowledge! Do not open it except by the method described above unless you are expecting an executable file from the sender. this is lies
It is also crap.