An anti-virus and a firewall protect your computer in different ways.
Anti-virus software:
- Examines software and files as they are written on to or read from your computer's hard drive
- Determines whether or not this software is malicious
- Blocks malicious software (malware) from infecting your computer
A firewall:
- Filters network traffic to and from your computer or local network
- Prevents hackers from accessing some parts of your computer or local network
- Prevents some viruses from spreading over the network