This was posted in the ATMB thread.
Here’s what a VPN is and how it works.
To create a VPN, you start by setting up a computer as a VPN server. Anyone can do this, and you can find free versions of VPN server software out there. Note that setting up a VPN server involves opening certain software ports to the internet, which is a huge security risk. If you don’t understand things like sockets and ports, you should not even consider doing something like this yourself.
Once this is set up, then other computers can create VPN connections to this VPN server. There are VPN clients that you can purchase, but most operating systems these days can make VPN connections without the use of external software. In Windows 10, for example, you go to your network connections, go under VPN connections, and add a new connection (that’s glossing over a lot of details).
Once you create your VPN connection, you can use it to connect to the VPN server.
Now that these are connected, your computer will appear to be on the remote server’s network as if it were just another local computer.
The data between your computer and the VPN server is encrypted. Once the data gets out onto the VPN server’s network though, it is no longer encrypted.
Just to be clear, because this seems to be the question being asked, a VPN is not a generic data encryption system that protects you from the internet in general.
So here’s what happens if you use the remote computer’s network to connect to the internet. Your data is encrypted, and sent over the internet to the VPN server. The VPN server then un-encrypts your data and sends it out over the internet. At that point, your data is no longer encrypted. The encryption is just the method used to make it look like your computer is connected to the remote computer’s network.
What the VPN ends up doing is making it look like you have some magical private wire going between your computer and the VPN server. But it’s not really a wire. It’s a virtual connection (hence the V in VPN) not a real physical connection. You have a virtual connection between you and the VPN server that only the two of you can use, so it’s private (that’s the P in VPN).
If you do connect to the internet, whatever you connect to sees the data as originating from the VPN server’s network. And that gets us into the topic of IP Spoofing, so let’s not go any further than that.