The third incarnation of Lord Vishnu was the Varaha Avatar (the boar). Varaha is the symbol of the restoration amidst chaos in the world.
According to Puranic scriptures, Varaha is stated as the eternal upholder of the Earth. The legend states the two gate-keepers of Vishnu’s dwelling Vaikuntha were cursed and born as demons named Hiranyaksha and Hiranyakashipu. The two evil demon brothers created mayhem all over the earth.
The elder brother Hiranyaksha prayed Lord Brahma and was awarded a boon that no man, animal, beast or god could kill him. He fought a war with gods, stole Vedas from Brahma and dragged earth in depths of primitive waters. While asking for a boon from Brahma he included all animals, humans, and god but forget to include the name of boar in the list of animals that could kill him.
When the Goddess Earth had been taken captive by the demon Hiranyaksha and carried to the bottom of the cosmic ocean, Vishnu assumed the form of a boar (Varaha) and dove to her rescue. With the head of a boar and the body of a human, Varaha is heroically posed. Having just rooted the Goddess Earth out of the cosmic mud with his tusks, the rescuer is poised to push off from the ocean floor and return her to the surface. Thus (particularly in legends depicting the process of creation at the beginning of a new Kalpa), all material creation (i.e. Earth) emerges from Water.
Seeing the earth rising above the sea and hearing the terrible words of Varaha, Hiranyaksha was shocked who challenged his power. There was a fight between the demon and Varah. With one stroke, he lifted Hiranyaksha on his molar and turned and threw him away in the sky. After circling in the sky, he fell down on earth near Varah. The mortified Hiranyaksha saw that Varah is no more Varah but Lord Vishnu.
He caught the feet of God and said- “God! You put an end to the curse of sin and got rid of this birth at your own hands. I was liberated, but what will happen to my brother Hiranyakashipu? Let him be free too.”
Lord Vishnu laughed and said – “There is no end to one’s sin before time. The sin of your brother Hiranyakashipu is not yet over. Earth became the reason for your end. I will have to take another avatar to end that. You were saved by me after I become a Varaha. He will have to be saved by taking an avatar in the form of Narasimha.”
Varah then killed Hiranyaksha and retrieved the Vedas from the asura and brought it back to the safe custody of the Lord Brahma.