Firewalls monitor and control network traffic by establishing a barrier between a secure internal network and untrusted external networks, such as the Internet. They use a set of predefined rules to filter traffic and block unauthorized access. In a nursing environment, firewalls can be configured to allow only certain types of traffic, such as data from electronic health records (EHR) systems, while blocking potentially harmful data from entering the network.