BGP (Border Gateway Protocol)
BGP is the routing protocol that networks on the internet use to tell each other which IP address ranges they can reach, and by which path.
Definition
The internet is a network of networks, each identified by an Autonomous System Number (ASN). BGP, currently version 4 as defined in RFC 4271, is how these networks exchange 'route announcements': messages saying which blocks of IP addresses can be reached through them.
How it works
Each network picks the best path to a destination based on the announcements it receives and its own policies, such as cost or business agreements. BGP originally trusted announcements by default, so a mistaken or malicious announcement can redirect traffic (a 'BGP hijack'). Resource Public Key Infrastructure (RPKI) lets networks cryptographically check that an announcement comes from the rightful holder of the addresses.
Why it matters
BGP explains why your traffic sometimes takes odd routes, why a VPN server in one city may be slow from another, and why large outages can spread worldwide in minutes. Encryption such as TLS or a VPN tunnel protects the contents of traffic even if it is misrouted, but it cannot stop the routing problem itself.