The story of Somavansh explains the tale of Pururavas and Ila dynasty. Vishnu Purana mentions the story of Somavansh and Pururavas in extensive manner..
The creator of the world, Brahma had a son named Atri. Chandrama was the son of Atri. Once Chandrama organised a Rajsuya Yagya and received great powers. Afterwards blinded by his powers, Chandrama kidnapped Tara, the wife of Brihaspati.
Even his grandfather Brahma tried to dissuade him from committing such a grave crime but Chandrama was not to listen to anybody. Because his hostility with Brihaspati, the teacher of the demons Shukra was also assisting Chandrama. At that moment of need, only Rudra came forward to help Brihaspati.
A fierce battle followed between Chandrama and Rudra. The gods were helping Brihaspati while because of Shukra, the demons fought from the side of Chandrama. Soon the battle assumed the proportion of a war that perplexed the entire world. At last, Lord Vishnu mediated to end the battle and helped Brihaspati to get his wife back. By that time Tara had conceived a child. Seeing her condition Brihaspati instigated Tara to abort the baby. Tara aborted the baby amidst some shrubs but it did not die. Instead, his brilliance dulled even the radiance of the gods.
The baby was so beautiful that both Brihaspati and Chandrama were eager to accept him. To settle the matter, Brahma asked Tara about the paternity of the child. Feeling shy, Tara revealed that Chandrama was the father of the child. Then Brahma himself adopted the child and named him as Budha.
When he grew young, Budha produced Pururava from Illa. Pururava was very magnanimous and handsome. Once an apsara Urvashi happened to see him and at once fell in love. She then approached Pururava. Her beauty enchanted Pururava also. He requested the apsara to stay with him. But Urvashi stipulated that she might stay with him if he agreed to follow her two conditions that he would never drive the two sheep, which were like her children away from her bed and that he would never undress before her in visible light.
Pururava accepted both the conditions. Since then Pururava began to live with Urvashi. Together they enjoyed their physical intimacy for sixty thousand years. Their love grew so much that even Urvashi forgot those heavenly comforts that she used to enjoy once. Because of her absence, even the heaven appeared more dreaded than hell.
At last, one Vishvavasu who knew about the conditions stole one sheep from their bedroom and flew away. Hearing the cries of the sheep, Urvashi got up in anxiety and shouted who was stealing her son. But Pururava pretended as if asleep for the fear of being seen naked. As the fuss grew further, he could no more contain himself and ran after the thief.
Right at that moment, the Gandharvas produced intense lightning illuminating the whole scene. As a result, Urvashi saw Pururava in a naked state and at once left his palace to her heavenly abode for now both of her conditions had been violated. Pururava could not tolerate the separation of Urvashi. He began to roam here and there in that bare condition like a mad. Thus roaming he reached at Kamal Sarovar in Kurukshetra where he saw Urvashi with four other elves. Seeing Urvashi Pururava began to behave madly. It was impossible for him to control his sensual desires even in the presence of other elves. But Urvashi stopped him saying that she was expecting an issue and after a year, she will give birth to his child. She also promised at that time she will stay with him for a night.
After a year King Pururava once again reached that place where Urvashi handed over his son Ayu. As per her promise she also stayed with Pururava for a night and consequently in later course gave birth to five more sons. Urvashi informed Pururava that because of their love Gandharvas wished to bless him with a boon.
Pururava sought a life-long union with Urvashi. Gandharvas presented him with an altar and instructed to conduct regular Yagyas properly. Then all of his desires would come true, the Gandharvas assured Pururava. But King Pururava left that altar in the forest and returned to his capital. At mid-night, he awakened suddenly as if from a trance and hurried to the forest to recover his altar. But the altar was no more there; it had transformed into a peepal tree.
Pururava got that tree felled and brought it to his capital where the carpenters made Arani (a wooden implement used in ancient India to produce fire) from its wood. Since then Pururava conducted regular Yagyas with the help of that Arani and attained to the Gandharvaloka where he was never separated from Urvashi again.