It was Queen Draupadi's faith in Lord Krishna that caused Him to miraculously appear before her and save her and her husbands from being cursed by Yogi Durvasa.
Prince Duryadhana learned that the five Pandava princes and their wife Draupadi were dwelling as happily in the forest as they previously had in the Kingdom. Suddenly the righteous and famous yogi Durvasa arrived at Kurukshetra with his ten thousand disciples. After seeing the quick-tempered ascetic arrive, Duryodhana and his brothers yearned to make pandavas unhappy by causing them harm. Durodhana personally waited on the sage as a servant and provided him with a very respectful reception. Duryodhana served him painstakingly both day and night.
Prince Duryadhana learned that the five Pandava princes and their wife Draupadi were dwelling as happily in the forest as they previously had in the Kingdom. Suddenly the righteous and famous yogi Durvasa arrived at Kurukshetra with his ten thousand disciples. After seeing the quick-tempered ascetic arrive, Duryodhana and his brothers yearned to make pandavas unhappy by causing them harm. Durodhana personally waited on the sage as a servant and provided him with a very respectful reception. Duryodhana served him painstakingly both day and night.
After testing Duryodhana in this way for a while and seeing that he was neither incensed nor irritated, the peppery sage became amiably disposed towards him and said, "I have the power to give you three blessings. You may ask for whatever are closest to your heart. May you have good fortune? Remembering what had been decided earlier, the evil-minded Duryodhana said, "King Yudishthira is the oldest and the best of our generation. That religious man is presently dwelling in the forest with his brothers. I'd like you to be his guest, just as you and your disciples have been mine for a while. If you wish to do me a favor, then I'd like you to visit him right after his fine, lovely wife Draupadi has served food to the Brahmans, her husbands and herself, and has laid down to rest. Sage Durvasa then departed with his followers.
Duryodhana felt that he had accomplished all his purposes. For he knew that Draupadi could not provide food for Durvasa's ten thousand disciples after she had taken her meal. Though the pot she cooked in was given to her by the sun god and mystically produced unlimited quantities of food, it did so only before Draupadi took her meal. But once she ate, the pot would become empty- and stay empty till her next meal. Holding Karna's hand, Duryodhana displayed intense pleasure.
One day while the Pandavas were relaxing and Draupdi was lying down after having eaten, Yogi Durvasa, with his ten thousand disciples, arrived in that forest area. When the celebrated and honorable King Yudhishthira noted this, he and his brothers proceeded to greet them. He folded his palms, and offered the holy men proper and respectful greetings. Then he said, "Please feel free to go to the stream now, take your bath and return to our place and give us an opportunity to serve a holy sage like you.
Not knowing how Yudhishthira would adequately feast him and his disciples, the pure sage, along with his followers, proceeded to the river and began bathing. Princess Draupadi, who was devoted to her husbands, began to worry about how she would provide a feast for the holy men. Because she had already eaten her meal and the mystical pot would thus produce no more food, she would be unable to.
Thus, full of anxiety, Draupadi prayed to Lord Krishna, "O Krishna, son of Devaki; O Vasudeva, Lord of the universe; Your power is indefatigable and you dissipate the obstacles of persons who bow down to you. You are the Super soul, the creator and deliverer of the distressed. You are the highest of the high, and unlimited being; O Lord you are always kind, You are the greatest light and the essence of the cosmos. Your face is pointed in every direction; they call you the highest source and the resting place of all opulence's. O Lord of the Gods, when you protect someone, he is not afraid of evil. As you once protected me from Dushashana, who tried to strip off my Sari before an assembly of men, please free me now from this plight.
Draupadi returned with the pot, and gave it to Krishna. He gazed into it intently and noticed that there was a particle of rice and vegetable stuck to its rim. He took the morsel between his fingers and ate it.
Krishna who had long arms and who relieved the suffering said to Bhima, "Go quickly and invite the holy men here for Meals!". Bhima immediately proceeded towards the stream where the ascetics were bathing.
Meanwhile, the holy men were in the river rubbing their bodies and looking as though their stomachs were filled. As they came out of the water they looked at one another curiously. Turning to Durvasa, one said, Master, our stomachs feel full. King Yudhishtra has uselessly prepared a meal for us. What's the best thing for us to do now? We'll commit a terrible offence against that royal saint. I advise you not to return to the Pandavas but to run away quickly!"
When Bhima reached the river, he did not see any one there. He therefore searched all the bathing spots. As he did, he learned from the resident holy men that Durvasa's disciples had gone away. Bhima then returned to his camp and told Yudhishtra what had occurred. Nevertheless, the Pandavas, still expecting the holy men to return, waited for some time.
When Krishna saw them thinking in this way, sighing deeply and frequently, He suddenly appeared before them and said, "While I was aware of your danger from that hot tempered sage, Draupadi prayed to me to come here; so I came quickly. But now you have no reason to fear Durvasa. He's scared of your ascetic powers; thus, he's gone away. Righteous men like you never have to worry. Allow me to return home now". When the Pandavas and Draupadi heard Lord Krishna's words, their minds became relaxed, cured of the fever of anxiety. Yudhishtra said, "Krishna by your help we were freed from this unsolvable difficulty, just as persons drowning in the vast ocean reach the shore safely by means of a boat". Thank you for your help"
Thus, the scheme of the evil Duryodhana and his brothers was baffled by Lord Krishna's mercy.
By developing such faith in the Supreme Lord, we can easily obtain His valuable grace and thereby increase our wisdom and virtue manifold.
Also read story about how Lord Vishnu saved Gajendra:
http://krishnaseva.blogspot.com/2014/04/story-of-gajendra-and-lord-vishnu.html