What is a VPN and how does it work?
A plain explanation of VPNs — encryption, tunneling, what they protect, and what they don't.
On this page
A VPN — Virtual Private Network — routes your internet traffic through a private tunnel to a server run by the VPN provider. This article explains what that actually means, and what a VPN does and does not protect.
The problem a VPN solves
When you connect to a website, your traffic normally travels from your device to your internet provider (ISP), then across many routers to the destination. Your ISP can see which sites you visit. On public Wi-Fi, nearby devices can often spy on the traffic too.
A VPN fixes this by moving your traffic into an encrypted tunnel. The traffic is encrypted on your device and only decrypted at the other end — the VPN server. Your ISP sees only "encrypted data to the VPN server", not the actual sites.
How it works
- You start the VPN app — it connects to a VPN server somewhere (often in another country).
- The tunnel is created — your device and the server negotiate encryption keys, typically using protocols like WireGuard or IPsec.
- All traffic goes through the tunnel — websites, apps, everything. Each packet is encrypted, wrapped, and sent to the server.
- The VPN server forwards your traffic — it decrypts, sends the request to the website, receives the response, re-encrypts it, and sends it back.
The website you visit sees the VPN server's IP address, not yours.
What a VPN protects
- Privacy from your ISP — they see encrypted traffic to the VPN server, nothing more.
- Public Wi-Fi safety — nearby attackers cannot read your traffic, because it is encrypted.
- IP masking — websites see the VPN server's IP, so your home IP is hidden.
What a VPN does not protect
- Malware and phishing — a VPN does not stop you from visiting malicious sites or downloading infected files.
- Your accounts — if you enter your password on a fake login page, the VPN does not help. Passwords are still transmitted to that page.
- The VPN provider — the provider can see your traffic. Logging policies matter; a "no-logs" claim should be verified by an independent audit.
- Tracking within sites — cookies and trackers still work through a VPN.
Common uses
People use VPNs when traveling, on public Wi-Fi, or to reach content available only in certain regions. Some companies require VPNs for remote work so employees access internal systems through an encrypted connection.
FAQ
What does a VPN actually protect against?
A VPN encrypts your traffic so your ISP sees only encrypted data, not the sites you visit. On public Wi-Fi, it prevents nearby devices from reading your traffic. Websites see the VPN server's IP address instead of yours.
Can a VPN make you completely anonymous online?
No. While a VPN hides your traffic from your ISP and masks your IP, the VPN provider itself can see your traffic. Cookies, trackers, and browser fingerprinting still work through a VPN. "No-logs" claims should be verified by an independent security audit.
What's the difference between a free and a paid VPN?
Free VPNs often limit bandwidth, data, or server locations, and may log or sell your data to sustain free operation. Paid VPNs typically offer more server locations, faster speeds, stronger protocols (WireGuard, IPsec), and explicit no-logging policies backed by audits.
Is using a VPN legal?
VPNs are legal in most countries for legitimate privacy and security purposes. Some countries (China, Russia, UAE, North Korea) restrict or ban VPN use without government approval. Business VPNs for remote work are common and legal in most jurisdictions.
Summary
A VPN encrypts your traffic and routes it through a server, hiding it from your ISP and making public Wi-Fi safer. It is not a security magic wand — malware, phishing and tracking are still possible. Pick a provider with transparent, audited logging practices. For most people, a VPN is one useful layer, not a replacement for the rest.
Sources
- Cloudflare Learning Center — What is a VPN? (cloudflare.com/learning/access-management/what-is-a-vpn)
- NIST SP 800-77 — Guide to IPsec VPNs (nvlpubs.nist.gov)
Share this guide
Related guides
- How HTTPS works: the lock icon explained
What actually happens when you see the padlock? Encryption, certificates and why every website should use HTTPS.
- What is a proxy server and how does it work?
A plain explanation of proxy servers — forward vs reverse, what they do, the headers they add, and what they cannot protect.
- How DNS works: a plain explanation
What happens when you type a web address? A simple walkthrough of DNS — domain hierarchy, resolvers, caching and TTL.