King of deities Indra kills the vritrasura with a thunderbolt
Vritra (Sanskrit: वृत्र, vṛtra, lit. 'enveloper') is a Vedic serpent or dragon in Hinduism, the personification of drought and adversary of Indra. Vritra is identified as an Asura. Vritra was also known in the Vedas as Ahi (Sanskrit: अहि ahi, lit. 'snake'). He appears as a dragon blocking the course of the rivers and is heroically slain by Indra.
In many 20th-century interpretations of the Rigveda, Vritra was interpreted as a reference to the dams and irrigation systems of the non-Vedic Indus Valley Civilization (IVC), which were disliked, attacked, and probably destroyed by the Vedic Aryans, thus contributing to the end of the IVC. Ideas about the end of the IVC have changed in recent decades, and this theory is now less popular, but it can be seen, for example, in the classic An Introduction to the Study of Indian History of 1956 by D.D. Kosambi, written when this was the conventional academic view.
According to the Rig Veda, Vritra kept the waters of the world captive until he was killed by Indra, who destroyed all the 99 fortresses of Vritra (although the fortresses are sometimes attributed to Sambara) before liberating the imprisoned rivers. The combat began soon after Indra was born, and he had drunk a large volume of Soma at Tvashtri's house to empower him before facing Vritra. Tvashtri fashioned the thunderbolt (Vajrayudha) for Indra, and Vishnu, when asked to do so by Indra, made space for the battle by taking the three great strides for which Vishnu became famous. 
Vritra broke Indra's two jaws during the battle, but was then thrown down by Indra and, in falling, crushed the fortresses that had already been shattered. For this feat, Indra became known as "Vṛtrahan" (lit. "Slayer of Vritra" and also as "slayer of the first-born of dragons"). Vritra's mother, Danu, who was also the mother of the Dānava race of Asuras, was then attacked and defeated by Indra with his thunderbolt. In one of the versions of the story, three Devas – Varuna, Soma and Agni – were coaxed by Indra into aiding him in the fight against Vritra, whereas before they had been on the side of Vritra (whom they called "Father").
Hymn 18 of Mandala IV provides the most elaborate account of the Vedic version. The verses describe the events and circumstances leading up to the battle between Indra and Vritra, the battle itself, and the outcome of the battle.
As told in the narration given to King Yudhishthira in the Mahabharata, Vritra was a demon created by artisan god Tvashta to avenge the killing of his son by Indra, known as Triśiras or Viśvarūpa. Vritra won the battle and swallowed Indra, but the other Gods forced him to vomit Indra out. The battle continued and Indra was eventually forced to flee. Vishnu and the rishis (sages) brokered a truce, with Indra swearing that he would not attack Vritra with anything made of metal, wood or stone, nor anything that was dry or wet, or during the day or the night. Indra used the foam (which Vishnu had entered to ensure victory) from the waves of the ocean to kill him at twilight.
SB 6.9.11: After Visvarupa was killed, his father, Tvashta, performed ritualistic ceremonies to kill Indra. He offered oblations in the sacrificial fire, saying, "O enemy of Indra, flourish to kill your enemy without delay."
SB 6.9.12: Thereafter, from the southern side of the sacrificial fire known as Anvaharya came a fearful personality who looked like the destroyer of the entire creation at the end of the millennium.
SB 6.9.13-17: Like arrows released in the four directions, the demon's body grew, day after day. Tall and blackish, he appeared like a burnt hill and was as lustrous as a bright array of clouds in the evening. The hair on the demon's body and his beard and moustache were the color of melted copper, and his eyes were piercing like the midday sun. He appeared unconquerable, as if holding the three worlds on the points of his blazing trident. Dancing and shouting with a loud voice, he made the entire surface of the earth tremble as if from an earthquake. As he yawned again and again, he seemed to be trying to swallow the whole sky with his mouth, which was as deep as a cave. He seemed to be licking up all the stars in the sky with his tongue and eating the entire universe with his long, sharp teeth. Seeing this gigantic demon, everyone, in great fear, ran here and there in all directions.
SB 6.9.18: That very fearful demon, who was actually the son of Tvashta, covered all the planetary systems by dint of austerity. Therefore, he was named Vritra, or one who covers everything.
Vritra became the head of the Asuras (portrayed as inherently demonic here, as opposed to the Vedic version in which they can be gods or demons). He renounced his dharma – duty – to do good unto others and turned to violence, battling with the Devas. Eventually, he gained the upper hand and the Devas were frightened of his evil might. Led by Indra, they approached Lord Vishnu for help. He told them that Vritra could not be destroyed by ordinary means, revealing that only a weapon made from the bones of a sage could slay him. When the deities revealed their doubts about the likelihood of any ascetic donating his body, Vishnu directed them to approach the Rishi Dadhichi. When approached by the Gods, Dadhichi gladly gave up his bones for the cause of the good, stating that it would be better for his bones to help them attain victory than to rot in the ground. The Devas collected the bones and Indra crafted the Vajrayudha from them. When they engaged Vritra again, the battle lasted for 360 days before Vritra breathed his last.
As per both Vedic and Puranic (Mahabharat) references, the terrible anthropomorphic personification of Brāhmanahatya (Brahmanicide) chased Indra and forced him into hiding for his sin, and Nahusha was invited to take his place.