Firewalls are software that help prevent others from coming into your computer from the internet. The internet is a two way street from your computer to the world. Individuals create software that searchs the internet to find computers that can be comprimised. Once a path into a computer is found then the contents of the computer can be tampered with or your computer can be hijacked to send out information or spam email.
Microsoft Windows computers and Apple computers come with a buit in firewall. These should be turned on to protect your computer. Other third party products are available that profess to be better at the job.
The following links give more information on the Firewall function.
Wikipedia is a standard type of information page describing firewalls.
A third party software supplier review can be found at the following: Review