PAC (Proxy Auto-Configuration) files use JavaScript logic, including if-else statements, to decide whether traffic should be routed through a proxy or connect directly based on conditions like IP, domain, or protocol. The Cisco Secure Web Appliance (formerly Cisco WSA) hosts PAC files by default on port 6001, which is used by clients to retrieve the PAC file during browser startup or proxy configuration.