1 Thess. 4:13-18 (NASB)
13 … But we do not want you to be uninformed, brethren, about those who are asleep, so that you will not grieve as do the rest who have no hope.
14 For if we believe that Jesus died and rose again, even so God will bring with Him those who have fallen asleep in Jesus.
15 For this we say to you by the word of the Lord, that we who are alive and remain until the coming of the Lord, will not precede those who have fallen asleep.
16 For the Lord Himself will descend from heaven with a shout, with the voice of the archangel and with the trumpet of God, and the dead in Christ will rise first.
17 Then we who are alive and remain will be caught up together with them in the clouds to meet the Lord in the air, and so we shall always be with the Lord.
18 Therefore comfort one another with these words.
The answer to the question is, "By Faith." Consider this verse:
3 By faith we understand that the worlds were prepared by the word of God, so that what is seen was not made out of things which are visible.
Genesis One tells us that the God of the Universe spoke the universe into existence. It will be a minor miracle to recreate the bodies of all who have gone into the grave.