The proxy server acts as a go between for websites and web browsers. It works by listening on a specific port number on the proxy server. Web browsers have to know which port it is, or they won't know how to connect to the proxy server.
A proxy server listens to a request from the web browser on its port number and forwards it to the website. The website's response is received by the proxy server, then forwarded to the web browser.
Some port numbers are popular. Port 3128 is the default port for the Squid proxy server. Port 8080 is the default port for the Microsoft ISA proxy server.
Once the proxy server administrator configures a port number for the proxy server, the web browser is configured to use the proxy server's port number and host name to browse the web.
Proxy server administrators do not use the default ports, because hackers know and attack them.
A PAC file (Proxy Auto Configuration) is often used by web browsers to automate configuration. A web browser fetches the PAC file to determine the proxy server's port number and other configuration.