Most Internet applications are based on the "client-server" model. The client makes an Internet Protocol (IP) request to the server, and the server responds accordingly. Firewalls are computer softwares and hardwares that screens the IP requests and prevents suspicious requests from being granted. This prevents attacks on a computer system through networks. Cryptography is often used in these systems for privacy purposes.
References:
What's a Firewall?
http://www.zeuros.co.uk/firewall/whatsfw.htm
Keeping Your Site Comfortably Secure: An Introduction to Internet Firewalls
http://csrc.ncsl.nist.gov/nistpubs/800-10/
Building Internet Firewalls
http://www.greatcircle.com/gca/tutorial/bif.html
Protect Your Data, Your Pricvacy, and Your Computer Networks
http://www.tis.com/docs/products/gauntlet/gauntlet1.html
TheThree Myths of Firewalls
http://web.mit.edu/kerberos/www/firewalls.html