Firewall software prevents unauthorised access to your computer while you are online.
You can think of a firewall as a customs officer at the airport who checks passports and searches luggage. If everything is in order, you are permitted to board the plane. If you don't have your passport, you are prevented from proceeding.
Once you have installed a firewall, you can choose which programs are allowed Internet access. For example, you could choose to allow AOL to access the internet, but deny access to WinAmp (an MP3 player which also includes a web browser).
It is recommended that you do not have more than one software firewall on the same computer, as firewalls sometimes conflict with each other, causing system errors.
While you are online, the firewall software runs in the background, checking for internet traffic that does not correspond with your list of allowed programs. It will notify you of suspicious activity and will either prompt you to take action or automatically block unauthorised attempts to access your computer.
Related Information: Which firewall software does AOL recommend?