A content delivery network keeps copies of your static files at locations around the world and serves each visitor from the nearest one.
WHY IT HELPS
Distance costs time. A visitor in London loading images from a server in Europe is fine; the same visitor loading from a server in another continent is not. A CDN removes that penalty for images, CSS and JavaScript.
It also absorbs traffic that would otherwise reach your hosting account, which reduces your bandwidth and resource use, and provides a measure of attack protection.
WHO BENEFITS MOST
Sites with visitors spread across multiple countries, image-heavy sites, and anyone experiencing bot or attack traffic.
A site whose audience is entirely local benefits less from the distance aspect, but still gains from the offloading and protection.
SETTING IT UP
Cloudflare's free plan is the usual choice and is straightforward: add the domain, verify the imported DNS records, and change your nameservers to theirs.
Keep mail records DNS-only, set SSL/TLS to Full (strict), and bypass cache for admin and login paths.
A CDN caches static files. It does not make a slow application fast. Fix caching and images first, then add the CDN on top.