What is a Firewall?

A firewall is a part of a computer system or network that is designed to block unauthorized access while permitting authorized communications.

It is a device or set of devices that is configured to permit or deny network transmissions based upon a set of rules and other criteria.

Firewalls are thus a specialized type of router focusing on specific types of network security functions.

Firewalls can be implemented in either hardware or software, or a combination of both.

Firewalls are frequently used to prevent unauthorized Internet users from accessing private networks connected to the Internet, especially intranets.

All messages entering or leaving the intranet pass through the firewall, which inspects each message and blocks those that do not meet the specified security criteria.

Courtesy :- http://en.wikipedia.org/wiki/Firewall_(computing)

What is Trojan Horse?

A Trojan horse, or Trojan, is software that appears to perform a desirable function for the user prior to run or install, but steals information or harms the system

Trojan horses may allow a hacker remote access to a target computer system. Once a Trojan horse has been installed on a target computer system, a hacker may have access to the computer remotely and perform various operations, limited by user privileges on the target computer system and the design of the Trojan horse.

Courtesy :- http://en.wikipedia.org/wiki/Trojan_horse_(computing)