All clerics can use healing magic.
Per the descriptions in the Player's Handbook, a cleric's magic comes from their deity:
Divine magic, as the name suggests, is the power of
the gods, flowing from them into the world. Clerics are conduits for that power, manifesting it as miraculous effects.
(PHB, p. 56)
Clerics can serve an evil god. Whether a player character cleric can serve a particular evil god is up to the DM to decide; some evil gods may not require all of the their servants to be evil, or to do evil deeds.
All clerics, regardless of the alignment of their deity, use the same basic spell list, which includes a number of healing spells. Each cleric chooses a divine domain which is related to their deity; this will give them additional spells and abilities. The DMG provides rules for an additional domain (Death, on p.96), which may be appropriate for clerics of some evil deities.
Note that there's no reason that a cleric of an evil god shouldn't be able to use healing spells. The cleric, their allies, minions, and followers, can all benefit from healing, and healing their servants may be entirely in the interests of an evil god.