Yes going through a VPN hides your IP address. The IP address seen is that of the VPN server.
However you should understand that this by itself is generally not enough. If its only your IP address you are worried about, then this should be enough. However other things can still compromise you.
- if the device you are on is compromised in some way, then the VPN may not help you in anyway.
- Depending on your activity, if the page you are visiting or app you are using uses webRTC, then that compromises your VPN setup. WebRTC bypasses the VPN and leaks your IP address.
- Your browser fingerprint can also reveal who you are. So hiding your IP changes nothing.
There is a lot of factors here that mix together that can affect your outcome. It depends on what OS you are on, what browser you use, what app you use, what website you are on, whether that website has fingerprinted your browser using google scripts and whether that fingerprint is already associated with any of your your accounts or your real IP.
For example for torrenting, having a VPN is enough to hide "you" as IP address is the only data other users that connect to you can see. But if you are running spotify app on your desktop for example, spotify has already fully fingerprinted your device hardware, knows your IP (if it connects just once using your real IP address), can see through your network and detect your entire network structure, and can see anything it wants on your system including contents of your private files. It then also shares this info with facebook and google. Any app installed on a windows device can do this if it wants to.
Windows itself can likely bypass your VPN and log every web-address you visit and send it to its own server even though you are using a VPN. Afterall windows has deeper access than the VPN to network traffic. Using a VPN from within windows will not fool windows itself about your actual IP address and what addresses you are visiting, thought it will not know the "content" of the communication.
If you visit and log into an account even once on the websites of google, microsoft, facebook, (and many other major corporate websites) , they will get the fingerprint of your browser, and then if you visit any website at all on the internet (with the same browser) that runs their scripts (most websites use google scripts in the background) then they will recognize you as the "same fingerprint". Using a VPN on the browser will no longer make any difference as they have your fingerprint and its now associated with an account (which has a phone number already associated with it).
The way to deal with fingerprinting is to prevent those scripts from running (when possible) and being careful about which website you visit and managing which "fingerprints" you log into websites with.
So a LOT of factors involved. And an absolute nightmare.