Firewalls are devices that are used to separate networks into different security domains. They act as a barrier between two networks and control the flow of traffic between them. Firewalls use a set of rules to determine what types of traffic are allowed to pass through and what is blocked. This helps protect a network from malicious traffic and unauthorized access. Additionally, firewalls can be configured to log traffic and provide additional security measures such as packet filtering and stateful inspection.