While web hosting provides a physical space for a website on a server, a CDN ensures fast access to the website's content by duplicating and distributing it across a global network of servers.