A lich (not to be confused with a lichen) is a class of monster in NetHack represented by the overall symbol L. Liches are all powerful spell-casters, and their more powerful forms have the ability to destroy armor, cast touch of death and most other spells, and teleport away when attacked; they are thus a frequent target of blessed genocide. All liches crumble to dust when killed and therefore do not leave corpses. The two most powerful kinds can be generated with athames, useful engraving weapons that are not normally generated.
Lich means "corpse" in several Germanic languages, and survives in English in the word "lichgate" (or "lych-gate", etc.), a covered entranceway to a churchyard. Nothing to do with "leech".
Liches are powerful spellcasters, often magicians or kings, who seek to defy death by magical means. Are depicted as being clearly cadaverous, bodies desiccated or completely skeletal, with glowing lights in place of their eyes.
The lich, L, is the least powerful monster of this class. It is slower than its brethren and not a significant threat. At the experience levels it is normally encountered, its complement of spells include healing itself, hasting itself, stunning you, turning invisible, draining your strength, destroying your armor, cursing your items and aggravating monsters (awakening monsters on the level and drawing them to you). It is possible for a lich to be generated with a high enough level (16) to cast summon nasties; however, this will not happen in the Castle unless you reach it at a much higher experience level than normal.
In addition to the spells the normal lich can cast, the demilich, L, can often cast summon nasties; if you encounter one at the Castle, it is certain that it can cast this spell. It is possible for a demilich to be generated at a high enough level (21) to cast touch of death; however, this is almost impossible before reaching Gehennom.
Master liches and arch-liches (usually referred to as "the purple L") can teleport to the player, then to the upstairs to heal and back again, like a demon lord/prince. This form of teleportation is unaffected by no-teleport levels. While master liches at their base level cannot cast touch of death, if your experience level and/or dungeon level is high enough, they will be generated with the ability to cast that spell. Master liches are generated with a 7% chance of either an athame (86% chance) or a wand of nothing, but no random offensive items.
The arch-lich, L, is the most powerful form of lich. In fact, it has the highest difficulty of all randomly generated monsters. Next to the Wizard of Yendor, it is one of the most powerful spell-casting monsters in the game. In addition to the spells its weaker brethren can cast, it is guaranteed to be able to cast touch of death, bringing instadeath to the unprepared.
Since liches are covetous (teleporting back and forth from the up stairs), the general strategy for dealing with covetous monsters applies here. If you have teleport control, you can teleport to the up stairs before it does. Engraving a permanent Elbereth on the up stairs will prevent them from retreating. (A non permanent engraving will always erode.)
Liches can be prevented from teleporting by wielding a potion of paralysis, and hitting them with it while wearing a ring of free action. This should provide enough time to be able to dispose of them while they are paralyzed.
The best way to deal with a lich is to wield Magicbane to prevent the lich from cursing your inventory. Another way is to use Elbereth to prevent the lich from touching you. The Elbereth strategy will still leave you potentially open to attacks from the nasties that the liches summon.
Because the three lower lich types don't resist shock damage, Mjollnir is an excellent weapon to deal with them. If Mjollnir is not available, the Fire Brand will work on them as well. Arch-liches resist most elements, so there is no quick way to take them down, except by hitting them with a cockatrice or chickatrice corpse (don't forget to wear gloves), which will turn them to stone immediately. All liches can also be disintegrated by black dragon breath or digested by a purple worm.
All types of lich count as undead and are chaotic, so if you are also chaotic, they can be tamed by reading the blessed Book of the Dead. Master and arch-liches, however, are covetous monsters that wish to possess the Book of the Dead, and therefore can only be made peaceful, not tame. A tamed arch-lich can be made using the create familiar spell or by taming its lower brethren and then allowing them to grow up, but it's of little use as a tamed arch-lich can only cast self-beneficial spells, and therefore is rendered as a mediocre attacker that cannot even harm things immune to cold. Despite their covetous nature, they do not want the Amulet of Yendor. Therefore, they cannot be used to transport it across a non-teleport level.
Liches can make acceptable pets, but have their disadvantages. They are essentially useless against cold resistant monsters and are dangerous to abandon. The stronger versions will also always stay next to the player, which is useful if you don't have a magic whistle but also can be a nuisance by them getting in the way, and makes it difficult to stop them from killing shopkeepers. Master liches and arch-liches cannot be tamed due to their covetous nature. It is, however, possible to tame a lich or demilich and have it grow up. You can also get one polymorphing another pet.
But on its heels ere the sunset faded, there came a second
apparition, striding with incredible strides and halting when
it loomed almost upon me in the red twilight-the monstrous mummy
of some ancient king still crowned with untarnished gold but
turning to my gaze a visage that more than time or the worm had
wasted. Broken swathings flapped about the skeleton legs, and
above the crown that was set with sapphires and orange rubies, a
black something swayed and nodded horribly; but, for an instant,
I did not dream what it was. Then, in its middle, two oblique
and scarlet eyes opened and glowed like hellish coals, and two
ophidian fangs glittered in an ape-like mouth. A squat, furless,
shapeless head on a neck of disproportionate extent leaned
unspeakably down and whispered in the mummy's ear. Then, with
one stride, the titanic lich took half the distance between us,
and from out the folds of the tattered sere-cloth a gaunt arm
arose, and fleshless, taloned fingers laden with glowering gems,
reached out and fumbled for my throat . . .