“And remember Ayyoob, when he cried to his Lord: Verily distress has seized me, and You are the Most Merciful of all those who show mercy. So We answered his call, and We removed the distress that was on him, and We restored his family to him and the like thereof along with them, as a mercy from Ourselves and a reminder for all who worships Us.” [Soorah al-Anbiyaa‘ 21:83-84]
Imaam ’Abdur-Rahman as-Sa’dee (d.1376H) – rahimahullaah – said,
“Meaning, remember Our slave and Messenger Ayyoob (’alayhis-salaam), praising him and revering him, (and) raising his station, when (Allaah) tested him with a severe test and thus found him remaining patient, being pleased with Him. (What occurred) is that Shaytaan had gained strength over his body as a trial and test from Allah. He (Shaytaan) blew into his body so he became full of ulcers. He remained this way a long period, and his ailment worsened and his family died and he lost his wealth. So he cried out to his Lord:
“Verily, distress has seized me, and You are the Most Merciful of all those who show mercy.”
So he sought a means of nearness to Allaah (with supplication) by mentioning his condition, and that affliction has seized him greatly. And due to the expansive and vast mercy of his Lord, Allaah answered him and said,
“Strike the ground with your foot. This is (a spring of) water to wash in, cool and a (refreshing) drink.” [Soorah Saad 38:42]
So he struck (the ground) with his foot and a cold spring gushed forth, so he washed therefrom and drank, so Allah cured him of his ailments.
“…and We restored his family to him…”
Meaning, We returned to him his family and his wealth.
“…and the like thereof…“
(Meaning), that Allaah bestowed upon him well-being, also an abundance of family and wealth.
“…as a mercy from Ourselves…”
(Meaning) upon him due to him having patience and being pleased (with what Allaah decreed), so Allaah gave him an immediate reward before the reward of the Hereafter.
“…and a reminder for all who worship Us…”
Meaning, We have made it an admonition for the worshippers who benefit from practicing patience. If they look to the distress that afflicted Ayyoob (’alayhis-salaam) then how (Allaah) rewarded him after it left him, and (if) they look at the reason behind that, they will find that it was (because) of his patience. Due to this, Allaah praised his mention because of it in His statement,
“Truly, We found him patient. How excellent a slave! Verily he was ever oft-returning in repentance (to us).” [Soorah Saad 38:44]
So He made him an example (for the slaves) when calamities befall them.” 
: Taken from Tayseer al-Kareem ar-Rahmaan (p. 613-614) of Imaam as-Sa’dee.
Translated by Abu Suhayl Anwar Wright, 19th of Ramadaan, 1435H