When introduced to D&D and to the cleric class, a new player might first ask "what is a cleric?" I think they're all asking what the word cleric means outside the context of D&D because I was. Veteran players might answer by describing what distinguishes the class from the other classes mechanically, or they'll describe what is thematic about the cleric. What they don't tell you is that cleric means "of the clergy". Clergy is a social class similar to peasantry and nobility. A cleric in D&D is therefore anyone from any rung on the ladder within the religious class of your setting.
That means an individual cleric could be a priest-in-training, a fully-fledged ordained priest, a warpriest, a ranking bishop or cardinal, or even the patriarch of their religion. All these things are clerics in D&D.
We could stop there. That's plenty of definition. However, everyone and their grandmother will have their own expectations of what a Cleric really is. Some people might approach the subject with a background in fantasy gaming. Others might approach the subject from a real-world religious perspective. Still others might take inspiration from pulp-literature.
That's a lot of variation. We can narrow it down some more.
D&D Origins of the Cleric
The Ceric is one of the original D&D classes. It combined martial powers of the fighter and magic powers of the magic-user (aka the wizard). The Cleric was inspired by medieval Clerics, biblical figures, and horror literature like Van Helsing in the Dracula novel. Already, the D&D Cleric is set up to be a mix of many different things.
None of these inspirations were healers.
The D&D Cleric's most notable mechanic was turning the undead. Original D&D let you use "Turn Undead" until it failed. You could still use it, but you couldn't affect the specific undead creatures who resisted it for 24 hours. This mechanic defined the class as the party's first and best answer to the undead. That put the Cleric neatly into the role of a support character who needed to be protected. If your Cleric perished, there's nothing to hold back the hordes of undead waiting for you in the dungeon.
Cleric Variants
In the 1976 D&D supplement Eldritch Wizardy, the Druid sub-class of Cleric was added to the game. The Druid remained a Cleric sub-class in Advanced D&D 1e. In case you missed it, let me repeat for emphasis. Druids were a sub-class of Cleric. Why would this be?
Because the Druid fills the equivalent social role in their respective culture.
What this does is it opens the door to reinterpreting the Cleric class as something more than specifically a Christian-derived class. If your adventuring class is also your social class, then a fighter is a member of the warrior class, a magic-user is a member of the academic class, the rogue or thief is a member of the criminal or outsider class, and the Cleric is a member of the spiritual class. The Christian inspiration becomes one of many flavors.
Modern D&D's equivalent to this Druid sub-class of Cleric might be the Nature Cleric. Thus, the various subclasses of Cleric can define different religions or different aspects of a poly-deistic religion. We have a storm Cleric, a war Cleric, a knowledge Cleric, etc., etc. The spectrum of Clerics is broader and broader. The interpretations of them broadens.
What do all these Clerics have in common?
Cleric's Role in Society
I keep touching on this, and now it's time to expand on it. Agree or disagree, the Cleric is effectively a social class. The D&D Cleric is mankind's material connection to the divine. The D&D Cleric is granted their spells through prayer. The different sub-classes are granted distinct spells by their Gods. When the Cleric casts spells, they are performing a miracle.
That said, each God may have different expectations of their respective Cleric. A Cleric of Life heals. A Cleric of War fights. These are very different, but what do they have in common? What is the God's intention in these Clerics performing these roles?
The Clerics are taking care of the worshippers.
The God who intervenes directly takes away agency and responsibility from his worshipers. The God who offers his worshippers nothing gives them no reason to offer him anything, ask him for anything, or follow his rules. And mankind needs rules.
So the God sends an agent.
Do Clerics Rest? How Clerics Serve Society
Clerics can't smash evil and chaotic forces nonstop. What do they do when they're not adventuring? They preach. They teach. They take confession and they prescribe penance. They perform baptisms and marriage ceremonies. They pray for the sick and dying and offer them their comfort. They lead at funerals and help the grieving. They tell stories. They sing hymns. They say prayers.
These are all acts of kindness, charity, and compassion. When the Cleric puts down his mace or war hammer, he picks up the book. The Cleric's job is never done. There are aching hearts to soothe. There are confused minds in need of guidance. There are people struggling with the bigger questions of the world, and the priest gives them perspective.
All societies struggle with the unknown, with times of uncertainty, and times of crisis. All of these things that the Clerics do keep a struggling people going. The Cleric's words and actions bolster their faith with hope.
When life is hardest, we ask why do we keep going? The Cleric offers Hope. Hope is the medicine you need when you're hurting spiritually.
The Cleric is the embodiment of hope.
Related: I want to link you to this YouTube video. Clerics in D&D! (DungeonCraft #63): https://www.youtube.com/watch?v=Tlu0t4Y-Auk. I think it's the best interpretation of a fantasy Cleric.