Certain types of attachment are more dangerous than others. While viruses and malware can potentially be embedded in most types of files, there are certain types of files that you should never open regardless of the source.
Files that end in .exe are executable programs and there should never be a reason for anyone you know to send you a .exe program. Files that end in .doc, .pdf or .xls are more likely to be safe but they should still not be opened if sent to you by an unknown sender.
Only the last three letters matter in a file type. For example, a file ending with .doc.exe is still considered a .exe file and should never be opened. Never.