What is the story of the birth of Mandodari (Ravana's wife) ? And how she get married with Ravana ?
According to the Puranic Encyclopedia, the Uttara Rāmāyana narrates the story of how an apsara named Madhurā turned into a frog and then into Mandodari who becomes the adopted daughter of Mayasura and his apsara-wife Hema:
Maya, an asura, was born to Kasyapaprajāpati of his wife Danu. Once Maya went to Devaloka to see the dances of the celestial maidens there. Devas came to know that Maya was in love with the nymph Hema and they married her to Maya. Maya went to the southern valley of Himawān and lived there with Hema constructing there a city called Hemapura. They got two sons Māyāvi and Dundubhi. But they grieved over the lack of a daughter and she went to a side of Himavān and started penance there to get the blessings of Śiva. Once a celestial damsel named Madhurā after observing Somavāravrata went to Kailāsa to pay obeisance to Siva. Pârvati was absent from the place then, having gone to attend the birthday celebrations of one of her sons. So Madhura met Siva sitting lonely and this led to a clandestine sexual union between them. When Pârvati returned she saw traces of the ashes from the body of Siva on the naked breast of Madhura and Parvati in her anger cursed Madhură to live in a well for twelve years ás a frog. Siva was stupefied at the curse and he went to the well and consoled her by saying that she would after the twelve years of life as a frog become a very beautiful maiden and would be married by a man of great fame and valour. It was near this well that Maya and his wise were performing penance to get a daughter. After twelve years the frog changed itself into a beautiful maiden and cried loudly from the well. Hearing the cry Maya and Hemä, who were nearby peeped into the well and seeing the young girl took her home and brought her up giving her the name Mandodari.
Rāvana returning after his victory march by that way visited Maya and seeing the girl fell in love with her and married her according to Vedic rites and took her to Lańkā.
Rāvana got three sons of her, Meghanāda, Atikāya and Aksakumâra.
The story is slightly different in the Uttara Kanda of Ramayana available at archive.org, where there is no mention of the frog story and according to it, Mandodari was the biological daughter of Maya and Hema:
Thereat Maya, O Rama, answered that night-ranger [Ravana], when he had asked this,—'Listen. I shall tell thee all about this. Thou mayst ere this have heard of an Apsara named Hema. She like unto the Paulomi of Satakratu was bestowed on me by the gods. And I passed a thousand years, being devoted to her. Thirteen years have passed away since she had gone on a business of the celestials, as also the fourteenth year. Then I through my extraordinary skill constructed a golden palace, adorned with diamonds and lapises. There I dwelt, aggrieved and sorrowful on account of her separation. From thence, taking my daughter, I have come to this wood. This, O king, is my daughter, grown in her womb. I have come hither with her, seeking for her husband.
And on this wife of mine I have also begat two sons ;— the first is Mayavi and the next Dundubhi. Thus have I truly related everything unto thee that hadst asked for it.
But, my child, how can I know thee now? Who art thou? Thus addressed, the Rakshasa humbly said, — 'Ten-necked by name, I am the son of the ascetic, Paulastya, who was born as the third son of Brahma.' Thus accosted, O Rama, by that lord of Rakshasas, that Danava and foremost of Danavas, Maya, learning that he was the son of the Maharshi, Paulastya, there desired in his heart to give away his daughter to him. And taking her hand with his own, Maya — lord of Daityas - laughing, said unto that lord of the Rakshasas, - 'This daughter of mine, O king, borne by the Apsara, Hema, this my daughter named Mandodari do thou accept as thy wife.'
'Well' thereupon the Ten-necked answered him, O Rama And lighting a fire, he took her hand.
Maya, O Rama, knew the curse of the sage touching him.