By using virus detection program or by not downloading or opening the attachment.
some antiviruses will scan the email, so download those
Some attachments may contain harmful viruses, which could infect your computer. To avoid getting a virus, only open/download attachments from reliable sources, which you are expecting to be sent to you.
limits of viruses on the internet
Either the software you are using has filters that have been set to block attachments or if you use a web based mail service, they block attachments to avoid infecting users with viruses. There are usually filters available on the web based services to receive attachments.
it could be overun with viruses
They carry viruses that can harm your computer
Scanning all email attachments with anti-virus software will help prevent downloading viruses and other malicious code
Viruses can come from multiple sources, but the most common is removable media, from downloads off the Internet, and from e-mail attachments.
worms, viruses, and Trojan horses packets that are destined by malevolent hackers to harm your PC.
the virus could get in your blood stream and cause an infection
To avoid Computer Viruses to protect one computer to another computer.
Computer viruses are malicious software programs created by cybercriminals to infect and harm computers. They can come from downloading infected files, visiting malicious websites, or opening suspicious email attachments. To protect devices from viruses, users should regularly update their operating systems and antivirus software, avoid clicking on unknown links or downloading files from untrustworthy sources, and practice safe browsing habits.