proxy server is using TCP/UDP ports. Help of Layer 4 to solve Layer 3 addressing shortage.
say .... ur proxy has IP 192.168.0.1 with service running on port 80
client 1 IP 192.168.0.10
client 2 IP 192.168.0.20
then both clients connecting mail.yahoo.com.
client 1= 192.168.0.10/45000 -> [192.168.0.1/80 ----> 192.168.0.1/30000] -> mail.yahoo.com/80
client 2= 192.168.0.20/38974 -> [192.168.0.1/80 ----> 192.168.0.1/30001] -> mail.yahoo.com/80
proxy keeps record of clients source ports (45000, 38974), these ports r used to identify correct clients for reverce packet/traffic.
Proxy will generate a seperate request to mail.yahoo.com on port 80 with its own 2 different source ports (30000, 30001)
Yahoo server will replay to those requests from proxy with 2 different source ports (30000, 30001) considering them as seperate requests.
source ports are random, and up to 65535. So source ports for each PC are unique, n very rare that 2 PCs will use same source port for same destination.
i hope u got it, its simple.