Simply put, a VPN is a “direct connection to a single provider,” while Tor is a “multi-hop route” where each node knows only its own segment of the path.
A VPN hides your traffic from your local network and your ISP because you encrypt the connection to the VPN server. But that’s where the magic ends: the VPN provider sees your real IP address, knows when you connected, and in some cases can see where you’re going. In other words, you’re simply shifting your trust from your ISP to the VPN service.
Tor hides your IP from the websites you visit because the website sees the exit node. Plus, Tor makes it harder for your local network to track which sites you visit. But Tor doesn’t make you invulnerable: if you log into personal accounts, if you have leaks, or if you give yourself away through your behavior.
Important: a VPN does not solve the “entry-exit” correlation problem at the level of the entire internet, while Tor attempts to complicate it through routing. On the other hand, a VPN is usually faster and more stable.
So the question “Tor or VPN” is almost always really the question “who is watching me and what can they do?” Against a café Wi-Fi administrator, both tools are useful, but in different ways. Against websites and ad networks, Tor offers more.