A firewall is a program or hardware designed to protect your computer against unauthorized intrusion. Many firewalls bar known trojans and viruses, but even the best firewalls can allow those sneaky programs onto your computer. Most firewalls are focused on anti-hacking or other malicious actions that can crash or commandeer your computer, whether via a remote program or manual intervention by someone on the Internet.
An antivirus program has no influence against hackers and other actions. It pertains only to viruses, trojans or, in some cases, anti-spyware or anti-adware programs that track your computer and browsing history. Viruses, et al, are malicious programs that can damage or even destroy all the programs on your computer.
Keeping both your firewall and your antivirus programs current is imperative for safe and “healthy” computer use and Internet surfing.