Having reached her, you must now deal with her. Beware; as in Greek mythology, her gaze can turn people to stone. The best way to avoid this is to have reflection; she will look at you, see her reflection, and turn to stone. This can also be achieved by applying mirror on her. Otherwise, you may blind yourself, polymorph into a stoning-resistant creature and beat her to death, or you may rely on the speed system to kill her in one turn, with Finger of Death or a wand of Death. Also, if you have the sleep spell, apply that to her and kill her normally. Note that killing Medusa by reflecting her gaze breaks the pacifist conduct. Becoming invisible does not prevent you from meeting her gaze. Pacifists may find it useful to simply blind her and let the pets deal with her "peacefully", or give Medusa some wands and reflect the attacks while blinded and standing on an active E word.

If you don't have reflection, you might like to investigate the statue of Perseus after killing Medusa.

Sometimes Medusa can escape to the upstairs, and/or up to the previous level. So if you lost track of her (i.e. entered blind and then she disappeared from the telepathy map but you don't see a corpse), beware of her around her lair and on the level immediately above.

Her lair first appears in NetHack 3.1.0. Before that version, she appeared in an ordinary room-type level. It seems likely that many an adventurer met an untimely end from not knowing he would soon see Medusa. NetHack 3.0.0 adds a number of statues to her room, but this is an ambiguous clue. The use of telepathy or a potion of monster detection is advisable.

Medusa, one of the three Gorgons or Graeae, is the only one
of her sisters to have assumed mortal form and inhabited the
dungeon world.

When Perseus was grown up Polydectes sent him to attempt the
conquest of Medusa, a terrible monster who had laid waste the
country. She was once a beautiful maiden whose hair was her
chief glory, but as she dared to vie in beauty with Minerva,
the goddess deprived her of her charms and changed her
beautiful ringlets into hissing serpents. She became a cruel
monster of so frightful an aspect that no living thing could
behold her without being turned into stone. All around the
cavern where she dwelt might be seen the stony figures of men
and animals which had chanced to catch a glimpse of her and
had been petrified with the sight. Perseus, favoured by
Minerva and Mercury, the former of whom lent him her shield
and the latter his winged shoes, approached Medusa while she
slept and taking care not to look directly at her, but guided
by her image reflected in the bright shield which he bore, he
cut off her head and gave it to Minerva, who fixed it in the
middle of her Aegis.