A VPN protects your connection from your device to the endpoint or website you are connecting to. Of course the website will know who you are if you are logging into it to use its service. The VPN protects against your ISP or other networks like coffee shop WiFi from knowing the sites you visit, your traffic is seen as a tunnel to the VPN network and it leaves from there, instead of it being seen leaving from your computer to the sites.