While the Lady of the Lake is an important figure in the Arthurian mythos, there doesn’t appear to be much agreement about various aspects of the character, including her name and how many of her there actually were. At various times, she’s called variations on Vivien, Ninien, Nimue, and Elaine. She’s portrayed as a fairy, probably related in some way to Morgan le Fay, and like her plays both positive and negative roles in Arthur’s life depending on the writer and the situation. She’s most famous for giving the sword Excalibur to the legendary king, although even that isn’t always the case, as sometimes Excalibur is said to be the sword Arthur drew from the stone.
It appears that the most common explanation is that the Lady gave him a new sword after he broke the one from the stone. The Monty Python reference in the title mixes up the two sword stories, but I don’t think anybody was looking to that source for authentic Arthurian lore. According to Chretien de Troyes, she brought up Lancelot after his father, King Ban of Benoic, died in battle.
She was also traditionally seen as a pupil of Merlin‘s, who learned everything he had to teach and then imprisoned him in glass, or possibly a tree, a cave, or a floating castle.
Sometimes it’s to keep him to herself, and others just to be mean, or perhaps because he’s bothering her. In T.H. White’s The Once and Future King, he knows that she’s going to imprison him, but just thinks of it as a rest.
She’s sometimes said to take on the role of Arthur’s advisor after bewitching Merlin. Some versions of the legend, including those by Sir Thomas Malory and Alfred, Lord Tennyson, make Merlin’s enchantress and the woman who gave Arthur his sword and raised Lancelot into two separate figures. I’ll admit that’s how I usually think of them, the former being Vivien and the latter Nimue. Apparently part of why Malory did this was because he included an incident where the Lady was beheaded by Sir Balin, but wanted to use Nimue as a character after this. The knight, a rage-prone man known as Balin the Savage, was apparently involved in a blood feud with the Lady’s family. She accused him of killing her brother, and he said that she was responsible for the wrongful execution of his mother. The Lady demands the head of Balin in exchange for Excalibur, but the knight cuts off the lady’s head and is banished from Arthur’s court. At least one of these mysterious women is also credited with thwarting several of Morgan’s attempts on Arthur’s life.
The fairy woman has been linked to several other mythical figures. This site marks her similarity to Thetis, the mother of Achilles in Greek mythology, a water nymph who raised the greatest warrior of his time. And at least one Lady of the Lake married a man named Sir Pelleas, while Thetis’ husband was Peleus of Aegina.
The knight Pelleas, by the way, is not the same as the Fisher King Pelles. Along the same lines, the Lady is apparently sometimes called Elaine, also the name of Lancelot’s biological mother, the daughter of Pelles with whom the knight is tricked into having sex, and one of Morgan’s sisters. This last Elaine didn’t figure into the stories much, but I’m kind of proud of myself because I once made up a fairy character named Ellen who was Morgan’s sister, and that’s a variation on the same name. Anyway, another page proposes that Vivien was a variation on Coventina, a Celtic goddess of wells and springs.
She’s also sometimes associated with Diana, and the Arthurian Vulgate Cycle identifies her father as Dyonas, a godson of the goddess of the hunt. Like Morgan, she seems to have been demoted from immortal fairy to mortal with magic powers, perhaps several different such mortals. But then, if Ozma can be both Pastoria’s daughter and a fairy, maybe the same is the case for these ladies.