So assuming you are talking about a personal VPN. A corporate VPN is a different application of the same technology, but isn't about being anonymous.
As an analogy, let's say you wanted to subscribe to a naughty magazine like Playboy (is that still a thing?). But for privacy reasons, you don't want your neighbours to see you walking back from the community mailbox with it under your arm. And in your house, you don't want your kids or even your wife to see the magazine. So Playboy ships the magazine in a special locked envelope that only you (and the sender) have the key to. If someone like your mailman, wife, kids tries to open the envelope, they won't be able to.
So a VPN does something similar. But are you anonymous? Well, Playboy has to know what address to send the magazine to, so they know about you. Maybe they implement policies to minimize how much personal data they store from you, and delete it often, but there is still the chance some intern forgot to shred the subscriber list. And say they store the addresses on a computer system and it gets hacked or raided by law enforcement, your name and address are now theirs. And your mail carrier (and every postal worker up the chain)? Maybe he doesn't know what's in the secure envelope, but the return address is from the publisher for Playboy (amongst other magazines), so anyone who handles the package could maybe guess at what's inside, but can't prove it.
So the contents of the package can be considered secure, but it isn't 100% anonymous because they still have to know where to send it, and someone still has to deliver the mystery package to your address.
Another thing you might use a VPN for is to fake your address. Let's say Playboy stops shipping to Canada, but you really need those articles. You could ship it to some postal handling facility in the US, and they are instructed to package up the magazine in a new envelope and ship it to your house in Canada. This 3rd party postal forwardeer knows your real address, but the magazine doesn't need to. In the VPN realm, this can be used to bypass geoblocking restrictions, where content is only available to certain regions. Even if you are in Canada, if your VPN service lets you connect through a US server, you might be able to trick the service into letting you watch the georestricted content. For example, this used to work with Netflix, but they have mostly stopped it by banning any traffic coming from a known VPN service.
For more anonymity than a VPN can provide, there is
TOR, which I understand is used primarily for criminal activity. I'm not familiar with it, but I understand that naturally it can't be considered 100% anonymous either.