A Firewall is software used to protect a computer that is connected to the internet from intruders. It regulates the flow of traffic inbound and outbound on your computer.
When you have a firewall installed on your system it starts on boot up, It then runs in the background monitoring the traffic on your computer. As soon as something out of the ordinary happens it will inform you and ask your permission to allow it. Some do this in and out others ask if its going out and just block and log incoming.
Windows XP comes with a built in Firewall and needs turning off if you install another. You do this in Control Panel.