A CMS (content management system) lets you manage website content without writing code. A headless CMS separates the editing panel from the presentation layer: content travels via API to any frontend – a website, an app, an in-store screen.
A classic CMS (e.g. WordPress) glues everything together: panel, content database and presentation. Convenient at the start, but constraining – the site looks the way the theme allows, and every plugin slows the whole and can open a security hole.
A headless CMS (e.g. Sanity, Strapi) cuts off the "head": editors work in a comfortable panel while content is served via API to any number of channels. The frontend can be built in a modern, lightning-fast technology and replaced without touching the content.
Which when: classic CMS – simple sites, small budgets, familiar panel. Headless – demanding performance and security, multiple content channels, custom design.