What is a VPN and how does it work?
A virtual private network (VPN) is a service that creates an encrypted connection between your device and a server run by the VPN provider. Your internet traffic travels through this connection before reaching the wider internet.
The short version
Normally, your device connects directly to websites through your local network and your internet service provider (ISP). Both can see which servers you connect to, and the websites see your public IP address, which reveals your approximate location.
When you turn on a VPN, your device first builds an encrypted tunnel to a VPN server. Your requests travel through the tunnel, the VPN server forwards them to the website, and the replies come back the same way. The result:
- The local network and your ISP see only encrypted data going to the VPN server.
- Websites see the VPN server's IP address, not yours.
- The VPN provider can technically see your traffic metadata, which is why choosing a trustworthy VPN provider matters.
Key idea: a VPN moves trust from your ISP and local network to your VPN provider. It does not remove the need for trust altogether.
Key terms
- Encryption
- Scrambling data so only someone with the correct key can read it. Modern VPNs use strong ciphers such as AES-256-GCM or ChaCha20-Poly1305.
- Tunnel
- The encrypted connection between your device and the VPN server.
- IP address
- A numeric address that identifies your connection on the internet and reveals approximate location.
- DNS
- The system that turns names like example.com into IP addresses. A good VPN also routes DNS requests through the tunnel.
- Kill switch
- A feature that blocks internet access if the VPN connection drops, so data never leaks outside the tunnel.
- Split tunneling
- An option that sends only selected apps through the VPN while others use your normal connection.
Your traffic, with and without a VPN
The top row shows a normal connection. The bottom row shows the same request sent through a VPN.
What happens when you press “Connect”
Authentication
The VPN app proves your identity to the server using your account credentials or a cryptographic key.
Key exchange
Your device and the server agree on fresh encryption keys that only the two of them know.
Tunnel creation
A virtual network interface is created on your device and the system routes internet traffic into it.
Encrypted transfer
Each packet is encrypted on your device, sent to the VPN server, decrypted there and forwarded to its destination.
Return path
Responses from websites go back to the VPN server, are encrypted again and delivered to your device.
Want to see this in practice? Follow the step-by-step VPN setup guide for your device.
Common VPN protocols compared
The protocol is the set of rules a VPN uses to build the tunnel. Most modern apps choose a good one automatically.
| Protocol | Strengths | Considerations | Recommendation |
|---|---|---|---|
| WireGuard | Modern, small codebase, very fast, quick to reconnect. | Needs extra measures by the provider to avoid storing IP addresses. | Recommended |
| OpenVPN | Mature, widely audited, works on almost any network (TCP or UDP). | Usually slower than WireGuard. | Recommended |
| IKEv2/IPsec | Stable on mobile, reconnects quickly when switching networks; built into many operating systems. | Can be blocked by some restrictive networks. | Good choice |
| L2TP/IPsec | Widely supported on older systems. | Slower and older; prefer the options above. | Only if nothing else is available |
| PPTP | Very old and simple. | Known security weaknesses; considered broken. | Avoid |
What a VPN does
- Encrypts traffic between your device and the VPN server
- Hides your IP address from websites and services
- Prevents others on public Wi-Fi from reading your traffic
- Stops your ISP from seeing which sites you visit
What a VPN does not do
- Make you fully anonymous online
- Stop tracking by sites you sign in to, or by cookies
- Protect against malware or phishing
- Replace HTTPS, strong passwords or two-factor authentication
For real-world examples of when a VPN helps, read VPN benefits and limitations. Short answers to common questions are in the VPN FAQ.
Sources and official documentation
If your screen differs from our description, the official documentation takes precedence.
Ready to protect your connection?
Follow our step-by-step guide to choose a trustworthy provider, set up your device and confirm that your VPN is working.
GET VPN