A CDN keeps cached copies of your site on servers spread around the world. When someone visits, they're served from the nearest edge server instead of your origin, cutting the distance every byte travels.
On a cache miss the edge fetches from your origin once, then serves everyone nearby from memory. Your origin stays calm, users get millisecond responses, and traffic spikes hit the edges instead of you.