Margarita Nikolaevna is the master's lover. She comforted him and took care of him until he got into the psychiatric hospital, totally desperate by his novel. One moment, Woland contacts Margarita via Azazello and asks her to be the hostess at his ball. She learns to know witchcraft and loves to be invisible with the ability to fly. So she accepts Woland's invitation with pleasure. As a reward for her help she can make a wish and of course she wishes to be reunited again with her beloved master. Which happens...
The main prototype for Margarita was Elena Sergeevna Shilovskaya (1893-1970), born Nyurenberg. She was Bulgakov's third wife. Like the master and Margarita, they were both married when they met each other, and they both fell in love immediately. Elena Sergeevna Shilovskaya was married to lieutenant-general Yevgeny Aleksandrovich Shilovsky (1889-1952), and she met Bulgakov at a Maslenitsa party at the Bolshoi Gnezdnikovsky pereulok no. 10, close to ulitsa Tverskaya, the main shopping street in Moscow. In the novel the master and Margarita met each other for the first time when «she turned down a lane from Tverskaya».
We learn about Margarita's name for the first time in Book Two of the novel. Before the master had been saying that he would never tell her name to anyone.
Margarita has got characteristics of Gretchen (a German derivation of Margarita) in Faust by Johann Wolfgang von Goethe (1749-1832), and of some historical characters. In chapter 22, for instance, Woland refers to the 16th century French queen Marguerite de Valois (1553-1615). Her marriage with Henri de Navarre (1553-1610), the later King Henri IV, was the reason for the notorious Saint-Bartholomew's night with the massacre of protestants Huguenots in Paris in the night between August 24 and 25, 1572. The marriage of Marguerite and Henri knew much reciprocal cheating, and long periods of separation. In 1599 it was annulled. Marguerite kept her title of queen.
But there was also Marguerite de Navarre (1492-1549). She became the most influential woman in France during her lifetime when her brother acceded to the crown as François I (1494-1547). François I was the grandfather of the earlier mentioned Marguerite de Valois, and his sister Marguerte de Navarre was the grandmother of Henri IV, to whom the other Marguerite got married later. Confused? Well... on the website of the library of the University of Angers the confusion is even made more complicated because they describe Marguerite de Navarre as Marguerite de Valois, reine de Navarre (queen of Navarre). No wonder that Bulgakov blended them into one character. Still in chapter 22 Koroviev suggests that Margarita is the «lovely great-great-great-granddaughter» of «one of the French queens who lived in the sixteenth century».
The self-willed Ukrainean polemicist Alfred Nikolajevich Barkov (1941-2004) argued that Elena Sergeevna Shilovskaya wasn't Margarita's prototype. He said it was Maria Fyodorovna Yurkovskaya (1868-1953), an actrice of the Moscow Art Theatre MKhAT known under the pseudonym Maria Andreeva. She was the lover of the Russian writer Maxim Gorki (1868-1936). Gorky himself would then be the prototype of the master, and Margarita would have been a prostitute sent to him by Woland - who would have been the personification of Vladimir Lenin (1870-1924).