CDNs route users to the nearest edge. 'Nearest' is decided by either anycast (BGP routing) or geo-DNS (lookup user's location, return a regional IP). Each has different operational characteristics and failure modes worth understanding even if you don't run a CDN.
Anycast — same IP, many places
Cloudflare, Fastly, modern Akamai. Same IP advertised from every PoP. BGP routes user's packets to the topologically-closest PoP. Fast for the operator (DNS just returns one IP); routing decisions delegated to the internet's routing tables.
Geo-DNS — different IP per region
Older CDN model. DNS lookup returns regional IP based on geo of the resolver. Works without anycast capability. More control over which user goes where; more complex to operate (managing regional IP pools).
Failure modes
Anycast: BGP route flap during a regional outage redirects users to a working PoP automatically. Fast failover. Geo-DNS: needs DNS TTL to expire before users move; slow failover unless TTL is very short.
Where each one wins
Anycast: stateless content, large file delivery, public APIs. Geo-DNS: video streaming where you want regional control, content licensing per region, regulatory compliance ('this user's traffic stays in the EU').
Hybrid in practice
Most modern CDNs use both: anycast at the entry point, internal geo-routing for backend choice. Users don't see the seam. As a CDN customer, you mostly don't tune this; pick the CDN that defaults match your shape.