Headless: a service that does have an IP.
The default behavior of Kubernetes is to assign an internal IP address to the service. Through this IP address, the service will proxy and load-balance the requests to the pods behind.
If we explicitly set this IP address (clusterIP) to none, this is like telling Kubernetes "I don't need load balancing or proxying, just connect me to the first available pod".
When you create a headless service by setting clusterIP None, no load-balancing is done and no cluster IP is allocated for this service. Only DNS is automatically configured. When you run a DNS query for headless service, you will get the list of the Pods IPs and usually client dns chooses the first DNS record.
StatefulSet comes with the capability of running replicas with stable DNS name/entries that target each replica. And here comes the role of "Headless service" to deliver that.