The Lady of the Lake is a figure in Arthurian mythology who rules the Isle of Avalon. She has many names and varies different interpretations; she’s known as Nimue, Viviane, Elaine, Niniane and Nivian amongst others.
In early stories the Lady of the Lake was portrayed as a student of Merlin who was destined to grow more powerful than him and eventually trap him. Whilst Merlin could foresee this happening he couldn’t do anything to stop it and was forced to simply teach her until she grew clever enough to overpower him.
Later stories add in Excalibur; the magical sword which is given to Arthur by the Lady of the Lake; they also show her appearing at pivotal points in the story. She is sometimes split into two characters, sometimes referring to the other as ‘Nimue’- Nimue is one of the four queens who takes the wounded Arthur to Avalon.
The idea of splitting the Lady of the Lake into two characters; generally one being an evil sorceress figure and the other the benevolent Lady of the Lake is one that is commonly seen in later work.