With a headless CMS, the CMS is responsible for publishing content and media only; layout, presentation and front-end technology are the responsibility of the development teams that consume content and use as required. With the headless CMS, content is published that is available to any application via API data services. This is commonly known as content as a service (CaaS).
Static websites are great but they still need some kind of content management system. And committing Markdown files to GitHub isn’t a friendly option for the majority of users including developers. So we end up using tools such as Prose, Netlify CMS or Contentful for the editing interface, user authentication and handling the media files. Usually it is only the WordPress PHP templating layer that bothers the proponents of static websites and is perceived as the performance bottleneck. However, we now have the WordPress REST API which is way more flexible than any collection of Markdown files.
In short, JAMStack is a web development architecture that’s about developing websites using tools that are loosely coupled . The objective is to decouple the user interface from the Content Management System (CMS).