From the Islamic point of view the grave does not mean the pit in which the dead body is buried; but it stands for what is known as “barzakh” or a barrier between temporal life on earth and eternal life Hereafter.
So, death is not the end of life; it is a door opening to the real life beyond the grave. When one dies, he or she goes out of the temporary life of this world ready to enter the eternal life of tomorrow.
Even though we know that the next world lies across the great divide known as the “grave,” we do not know how long we have to tarry there. Even as we know that the present world does not offer us eternal life, we forget the fact that we are closer to death.
Allah teaches us that when we are resurrected for Judgment we will have the feeling that ‘we have tarried only for a day,’ or ‘for even less than a day.’ But in reality we may have stayed in the state of ‘barzakh” for decades, centuries or even millennia — Allah knows.
But that does not matter as far as our Judgment is concerned. All humans — those who died thousands of years ago and those who died a moment ago — will rise once again to face the reality of the eternal fate waiting for them on the Day of Judgment, which is the certainty that really matters.