A cleric is a worshiper chosen by a deity to wield divine magic.
In D&D 5e specifically, a cleric is defined by the Player's Handbook to mean a follower of a deity who has been specially imbued by that deity with the ability to wield divine magic.
A cleric may also be a priest, i.e. a member of the clergy, a preacher with a formal affiliation with a church who performs ceremonies and other duties. However, at least in D&D 5e this is not necessarily so. The term for a clergyman is acolyte, as in the acolyte background. Some clerics are acolytes, and some acolytes are clerics, but not all.
Outside of D&D, "cleric" and "priest" both mean essentially the same thing. In earlier editions of D&D, "priest" also had a formal meaning in the rules, e.g. in AD&D 2e, where "priest" referred to a category which included the cleric and druid; in AD&D 1e, "priest" referred to a cleric who had reached level 3, and so on. This can cause confusion.
Specific citations
The D&D 5e Player's Handbook p.56-57, "Cleric", is the primary source here.
Not every acolyte or officiant at a temple or shine is a cleric.
"Cleric" is a special term for members of the cleric character class, all of whom possess spellcasting power at minimum. A church may have many priests, but not all of them are clerics.
Most adventuring clerics maintain some connection to established temples of their faiths.
This is a key quotation, because it confirms that you do not need to be a member of an official church to be a cleric. Most have some connection, which implies that a few have no connection, and a number of those who do may be only loosely affiliated. Nowhere in the cleric class description does it say you must be a member of a church, or a preacher or officiant in the traditional sense.
As you create the cleric, the most important question to consider is which deity to serve [...]
It certainly sounds like following a deity is a necessary part of being a cleric. It doesn't say you have to be part of an official church hierarchy. It's probably quite common to do so, and certainly thematically appropriate, but it's not necessary according to the rules.
Moving on to p.127, "Acolyte":
You have spent your life in the service of a temple to a specific god or pantheon of gods. You act as an intermediary between the realm of the holy and the mortal world, performing sacred rites and offering sacrifices in order to conduct worshipers into the presence of the divine. You are not necessarily a cleric—performing sacred rites is not the same thing as channeling divine power.
https://rpg.stackexchange.com/questions/92308/can-clerics-have-divine-power-without-it-being-provided-by-a-god
– Sean Duggan Jan 15 '24 at 13:32