Gandhari had a boon from Lord Shiva to have 100 sons. Now, it is impossible for a woman to give birth to 100 sons in a single lifetime.
So how were all 100 Kauravas born together?
Hinduism Stack Exchange is a question and answer site for followers of the Hindu religion and those interested in learning more about Hinduism. It only takes a minute to sign up.Sign up to join this community
The story of the Kauravas' birth is told in the Adi Parva of the Mahabharata. First of all, the reason that Gandhari had a hundred sons was as a result of boon she had gotten from the sage Vyasa as a reward for the hospitality she had once shown him. Later she became pregnant, but the pregnancy lasted two years, and she got jealous that Pandu's wife Kunti had already delivered, so she got impatient and tried to terminate the pregnancy:
One day Gandhari entertained with respectful attention the great Dwaipayana who came to her abode, exhausted with hunger and fatigue. Gratified with Gandhari's hospitality, the Rishi gave her the boon she asked for, viz., that she should have a century of sons each equal unto her lord in strength and accomplishments. Some time after Gandhari conceived and she bore the burden in her womb for two long years without being delivered. And she was greatly afflicted at this. It was then that she heard that Kunti had brought forth a son whose splendour was like unto the morning sun. Impatient of the period of gestation which had prolonged so long, and deprived of reason by grief, she struck her womb with great violence without the knowledge of her husband. And thereupon came out of her womb, after two years' growth, a hard mass of flesh like unto an iron ball.
It was Vyasa, the one who had given her the boon in the first place, that made this mass of flesh into a hundred sons:
Gandhari, without endeavouring to disguise her feelings, addressed the Rishi and said, 'Having heard that Kunti had brought forth a son like unto Surya in splendour, I struck in grief at my womb. Thou hadst, O Rishi, granted me the boon that I should have a hundred sons, but here is only a ball of flesh for those hundred sons!' Vyasa then said, 'Daughter of Suvala, it is even so. But my words can never be futile. I have not spoken an untruth even in jest. I need not speak of other occasions. Let a hundred pots full of clarified butter be brought instantly, and let them be placed at a concealed spot. In the meantime, let cool water be sprinkled over this ball of flesh.' ...
That ball of flesh then, sprinkled over with water, became, in time, divided into a hundred and one parts, each about the size of the thumb. These were then put into those pots full of clarified butter that had been placed at a concealed spot and were watched with care. The illustrious Vyasa then said unto the daughter of Suvala that she should open the covers of the pots after full two years.... Then in time, king Duryodhana was born from among those pieces of the ball of flesh that had been deposited in those pots.... Then, O king, within a month, were born a full hundred sons unto Dhritarashtra and a daughter also in excess of this hundred.
That daughter was named Duhsala, by the way, and she married Jayadratha, who blocked the Pandavas from rescuing Arjuna's son Abhimanyu during the Mahabharata war. And Dhritashtra also had one other son, Yuyutsu, with a Vaishya woman. Yuyutsu was the only surviving son of Dhritashtra after the war, and he ultimately became a regent for Arjuna's grandson Parikshit when the Pandavas retired to the Himalayas and installed Parikshit on the throne.
It is interesting to note, by the way, that when Gandhari received all this from Vyasa, she was actually being helped by her own father-in-law, since Vyasa was Dhritashtra's biological father, as I discuss in this answer.
EDIT: More detail about Duhsala's birth is given in the next chapter of the Adi Parva of the Mahabharata. When the mass of flash was being divided into 100 pieces, Gandhari suddenly wished that she could have a daughter in addition to the 100 sons, so Vyasa accommodated her request:
All this while that illustrious and best of Rishis, Krishna-Dwaipayana himself was dividing the ball of flesh; and counting a full hundred of the parts, he said unto the daughter of Suvala, 'Here are thy hundred sons. I did not speak aught unto thee that was false. Here, however, is one part in excess of the hundred, intended for giving thee a daughter's son. This part shall develop into an amiable and fortunate daughter, as thou hast desired' Then that great ascetic brought another pot full of clarified butter, and put the part intended for a daughter into it.
So that extra daughter was Jayadratha's wife Duhsala.
Gandhari was married to Dhritarashtra she wrapped a bandage over her eyes and vowed to share the darkness that her husband lived in. Gandhari's brother Shakuni came to live with them to look after the interests of Gandhari. Once Sage Vyasa came to visit Gandhari in Hastinapur. She took great care of the comforts of the great saint and saw that he had a pleasant stay in Hastinapur. The saint was pleased with Gandhari and granted her a boon. Gandhari wished for one hundred sons who would be as powerful as her husband. Vyasa granted her the boon and in due course of time Gandhari found herself to be pregnant. But two years passed and still the baby was not born. Meanwhile Kunti received a son from god Yama whom she called Yudhisthira. After two years of pregnancy, Gandhari gave birth to a hard piece of lifeless flesh that was not a baby at all. Gandhari was devastated as she had expected a hundred sons according to the blessing of Rishi Vyas. She was about to throw away the piece of flesh when Rishi Vyas appeared and told her that his blessings could not have been in vain and asked Gandhari to arrange for one hundred jars to be filled with Ghee. He told Gandhari that he would cut the piece of flesh into hundred pieces and place them in the jars, which would then develop into the one hundred sons that she so desired. Gandhari told Vyas then that she also wanted to have a daughter. Vyas agreed and cut the piece of flesh into one hundred and one pieces and placed them each in the jars. After two more years of patient waiting the jars were ready to be opened.
"In the true sense Gandhari didn't give birth to 100 children. It was at the time when Kunti and Gandhari were both pregnant but Gandhari's pregnancy continued for a very long time which was unnatural. Meanwhile Yudhishthira was born to Kunti and Gandhari was furious as Kunti's son would now be the heir to the throne. In frustration she started beating her womb; the side effects of which, she gave birth to a lump of flesh. All were disappointed. Then Vyasa cut the flesh into 100 pieces and kept each one in a pot(immersed in ghee as mostly said). these pots were buried underground and after an year each piece was born as a son. If viewed under scientific light!"