A computer, tablet or smartphone that connects to the Internet has the potential to encounter viruses and malware. While you may be careful what you do online, you could still visit a website that has been compromised with malware (without even knowing it) or download malware from a message from a trusted friend whose account was hacked. Someone else who uses your device might not be as careful as you. Having antivirus and security software for your computer or mobile device gives you protection against many types of malware that might not be easy to spot.