No, a VPN connection itself does not protect you from malware and computer viruses. It does however encrypt your internet traffic and keep prying eyes from accessing your browsing history. Some VPN services, such as Nord VPN, do however provide additional security features such as ad and malware blockers. Additionally, many antivirus suites now offer VPN services along with their security features. Although VPNs and antivirus software are used for different purposes, there is still a degree of overlap that makes using both tools together beneficial.