The story began after the Pandavas escaped from the Lakshagraha and reached a dense forest. Tired and exhausted, they all fell asleep at night except Bhima who kept a watch. In the same forest lived Hidimba along with her Rakshas brother Hidimb who was a very powerful demon. He smelled the Pandavas resting at a distance and as usual asked Hidimbi to lure the well-built Bhima into getting eaten. Hidimbi confronted Bhima and instead fell in love with him. She assumed the form of a very beautiful lady, approached Bhima and expressed her desire to marry him. She also revealed her true identity and her brother's intentions. Bhima refused to accept her as his wife and confronted Hidimba. A great fight took place which resulted in Hidimb getting killed.
Yudhistira explaining the rules of marriage to Hidimbi
After killing Hidimb, Bhima wanted to kill Hidimba too as he thought that she might want to avenge her brother's death. Yudhishthira stopped Bhima from committing such a deed. Hidimbi then begged Kunti to allow Bhima to marry her as she was deeply in love with him and also because she was all alone now. Kunti ordered Bhima to marry Hidimbi. Bhima agreed on the condition that he could leave her once she bore a child with him. Hidimbi agreed and they got married. Within a year, Hidimbi gave birth to a son. They named him Ghatotkacha as his head resembled a pot. Ghatotkacha went on to become a great warrior and an important figure in the Mahabharata war. A master wizard and sorcerer, Lord Krishna gave him a boon that no one in the world would be able to match his sorcery skills except Krishna himself.