firewalls protect networks from outside intruders by imposing a complex set of rules to control traffic.

its that simple, a firewall is like a checkpoint on a highway to check any bad stuff gets inside.

think of it also like a security guard in a gated parking lot.

if you want to park your car inside the parking lot, you will have to pass all the rules that the security guard asks. once you are passed all the checkpoints, you are allowed to go in and go out.

well, a firewall is the same, but it does this very fast filtering information coming in and out of a network. a network can you you home DSL service for example.