a headless CMS provides generally all services you know from a traditional CMS, including content repository, permissions, workflow, versioning, taxonomy, etc. So it’s not just a database.
Here’s an example of what it looks like from a user perspective: https://kenticocloud.com/content-management
The difference is that it doesn’t care how you display the content — that is completely up to you and you have full control over the presentation. You only call the REST API that returns structured content in JSON format.
Here’s an example of such API call: https://developer.kenticocloud.com/docs/get-titles-and-images-of-5-latest-articles
I’m using our own product Kentico Cloud for illustration, but other headless CMS products work in a similar way.