How does anonymous VPN work?

Once connected to the VPN (assuming you use an option like "Use default gateway on remote network" or "Send all traffic over VPN connection"), all your requests are routed through the remote VPN server. So, your IP address for the rest of the world is the IP address of that VPN server (or any server through which the outgoing traffic is routed), not your own IP address.

You connect to that server (yes, using the internet), and that server connects to the rest of the internet. It's just like some web server would not know your local IP address from your own internal network either (like 10.x.x.x, 192.168.x.x or similar).