What a CNAME actually does — following the chain
A CNAME record is a redirect that happens inside DNS, before your browser ever makes a request. When a resolver looks up a name that has a CNAME, it doesn't get an answer — it gets told "that's really called something else, go ask for this name instead." So it does, and it keeps following until it lands on a name with an actual A record and a real IP address. One lookup you typed quietly becomes two or three under the hood.
That indirection is the entire value of a CNAME. Because www.example.com points at a name rather than a number, whoever owns that target — a CDN, a hosting platform, a status page — can move their servers, swap IPs, or fail over to a new region, and your record never has to change. You pointed at a name; they keep the name aimed at the right place. It's why platforms hand you a CNAME to set up instead of an IP address.