Firewall and Antivirus are two different security applications used in networking. A firewall acts as a gatekeeper which prevents unauthorized users to access the private networks as intranets. A firewall examines each message and blocks the same which are unsecured.
Antivirus is a software program that protects a computer from any malicious software, any virus, spyware, adware, etc.
Note: A Firewall cannot protect the system from viruses, spyware, adware, etc.