Kashyapa was an ancient sage, who is one of the Saptarshis with others being Atri, Vashishtha, Vishvamitra, Jamadagni, Bharadwaja. According to the Vedas, he is the son of Marichi, one of the ten sons of Brahma.
Kasyapa explained Diti about Rudra's prowess and wealth and that Maya is his slave. So he told Diti to keep her minds away from worldly pleasures and thereby with a pure mind and respect he wanted to worship the Lord. However Diti would not listen to him and she insisted on her desire. Finally Kasyapa being morally bound to her, had to pave way for her wishes. He then went and bathed in cool water and once more sat to meditate. Diti felt very bad and ashamed of her behavior for the need of worldly pleasure. With tears rolling down her eyes she ran to her husband begging for pardon. She insisted on Rudra not destroying the seed which the sage had placed in her womb. She also prayed to the almighty Lord Shiva to listen to her prayers and protect her and her generation.
To Diti's remorse Kasyapa said that her wrong has been two fold as she was the victim of her own desire and secondly she had disobeyed her husband by paying no heeds to his words. Kasyapa told her that she will be giving birth to two sons of extreme bad and wicked behavior. They will murder the innocent, violate the chastity of women, and insult great rishis. At a point of time when the three worlds no longer bear their deeds of rape and violence, the Lord is said to be incarnated just to kill them. Diti was taken aback by deep regrets. She kept her twin sons in her womb for a hundred years, knowing that they would be a trouble to the devas and the rishis.
Meanwhile in Vaikuntha where Sri Vishnu along with his attendants where living in an atmosphere of reality and sattwa. It is a place of no distinctions whatsoever it was. One day, Brahma's mind born sons the four Sanatkumaras, decided to visit Lord Vishnu in Vaikuntha. Though they are supposed to be the oldest living being they always looked like as though they were just five years old which was because of their great tapas. Even for great rishis and sages it is a challenge to cross the gates of Vaikuntha. However they successfully passed through the first six gates of Vaikuntha unchallenged. At the seventh gate they were stopped by two gate keepers of equal age and shining form, adorned with golden crowns and other sparkling ornaments. They were named as Jaya and Vijaya who mistook the Sanatkumaras or small children. The Sanatkumaras were badly hurt by this incident and they told the gatekeepers that they did not expect this in Vaikuntha for that was the place where a uniform oneness prevails. They also told Jaya and Vijaya how could they expect any evil things happening or entering into Vaikuntha for it is the place of the ruler of the universe. So the Sanatkumaras told the gate keepers that they are not to live in a place like Vaikuntha and hence they cursed them to descend on earth into the world of lust, anger and greed from which springs all diversity.
After remaining in their mother's womb for a hundred years, the top asuras were born in Kasayapa's ashram and they were named as Hiranyaksha and Hiranyakasipu. Signs showing ill and bad omens appeared everywhere. The mountains trembled. Storms uprooted trees and wrecked houses. The skies caught fire. There were damages everywhere because of the falling of the meteors down on the earth. Cows started yielding blood instead of milk. Both Hiranyaksha and Hiranyakasipu were a horror for they grew not only in size and strength, but also in arrogance and conceit. They murdered people, slaughtered animals, troubled virtuous women, disturbed the sacrifices of the rishi's and abused them. They were becoming a terror for their very names use to scare the people a lot. Both the brothers' actions were getting worse day by day and one day Hiranyaksha wanted to challenge the Indraloka and so he went there roaring like a lion with his teeth dripping blood, brandishing his club over his head. But feared of him everyone there were hiding. Finding nobody there to take up his challenge he then went into the ocean and challenged its ruler, Varuna. But Varuna told Hiranyaksha that he is no more ready to fight for now his mind is set on only one thing and that is Lord Vishnu. So he also told Hiranyaksha if he is bold enough to challenge the Lord then he might as well do that.
Now Hiranyaksha went looking for Sri Vishnu and was wanting to challenge him. Knowing that Sri Vishnu has incarnated as a Boar, and was lifting the earth from the oceanic waters, Hiranyaksha dived into the water. Seeing Vishnu lifting the earth on its tusks, Hiranyaksha spoke to him in a mocking manner that he had atlast found Vishnu who has been hiding all these days. Hiranyaksha also told Lord Vishnu in a fierce tone that he is going to fight and kill the Lord and avenge all the asuras he has killed. But Lord Vishnu in the disguise of a boar just didn't bother about Hiranyaksha and he continued lifting the earth. Once Sri Vishnu reached the surface he placed the earth and gave it some of his own strength so that it may continue functioning on its own. Then started a strong battle between the boar and Hiranyaksha, who was assisted by the asuras. Finally the Lord defeated all the asuras and Hirnayaksha was killed with eyes popping out and blood gushing out of his body. The beings of the three worlds wept in joyous relief, and rejoicingly burst into praise of Mahavishnu.