Rimsky-Korsakov wrote the libretto, which he based on the first act of the play The Maid of Pskov by Lev Alexandrovich Mey.
[1] The first and third versions of the opera The Maid of Pskov omit the action and material of the prologue.
She confesses to her unmarried sister, Nadezhda, of having been wooed by a man who passed through earlier (the man is Ivan the Terrible; this is not revealed in the libretto of this opera, but is the matter of the opera The Maid of Pskov to which this is a prequel), and that the baby is not her husband's.
As this conversation ends, Vera's husband finally returns, surprised by the presence of the baby.
Upon his demand to know where the baby came from, Nadezhda saves her sister by claiming to be the mother.