Allah, the Most High, says:
"Or the like of him (Uzair) who passed by a town, in ruins to the very roofs. He said: 'How will Allah (ever) give it life after its death?' So Allah caused him to die for a hundred years, then raised him to life. He (Allah) said: 'How tong have you tarried?' He said: 'I have tarried a day, or a part of a day'. Said He: 'No! you have tarried a hundred years; but look at your food and drink - years have not passed over it. And took at your ass! And that We may make you a sign to people, and took further at the bones, how We bring them together, and clothe them with flesh; so when it became clear to him, he said: 'I know that Allah is All-Powerful over all things."
Holy Qur'an (2: 259)
In the above verse, the Holy Qur'an tells us the story of a prophet, who when riding his donkey, passed by a town in which all the inhabitants had long ago died and their dwellings were in ruins. Then, he started asking himself how could it be possible for Allah to re-create those dead people and give them life. He doubted Allah's capability in this.
Therefore, Allah wanted to make clear His capability both to him and his people. So, He caused the prophet to die at the beginning of the day and remain there with his donkey as being dead for a hundred years. Then He brought him back to life at the end of that day.
Upon being resurrected, he was asked how long he had been remained dead. At first, he thought that he had slept only a day or a part or a day, but he was told that he had tarried for a hundred years, but he should look at his food and his donkey.
Then he looked at his food; he found it fresh and unchanged but he did not understand. This proof showed Allah's ability because the food would have been spoiled if it had remained for more than a day. It could only remain fresh for one hundred years by power beyond man's capability.
Then be looked at his donkey, and he saw that it had long ago died and its bones were scattered. Wild animals had eaten its flesh as it decomposed, during a hundred years.
Allah wanted to demonstrate His ability to give life to the dead and so He returned the bones to their proper positions and flesh appeared on them as before. Life was restored to the donkey once more.
Seeing this divine miracle the Prophet said: "Surely I know now that Allah is All-Powerful over everything, but I wanted proof of Allah's greatness, and His capability in re-creating the dead."
"And guard yourselves against the Day on which you shall be returned to Allah."