He can perform tayammum and pray, and does not need to repeat his prayer (after he gets water).
It must be pure soil: this can be sand, stone, gypsum, and so on. Says Allah, "Perform tyammum with pure soil," and all scholars of Arabic agree that "soil" is whatever covers the earth, dirt or otherwise.
First, one must have the intention (see the section on ablution). Then, he mentions Allah's name, strikes the soil with his hands, wipes his face and his hands up to the wrist. Nothing is more authentic and clear than what 'Ammar related. He said, "We became sexually impure and had no water, so we rolled in the dirt and prayed. This was mentioned to the Prophet and he said, 'This would have been enough for you,' and he struck the earth with his hands, blew in them and then wiped his face and hands with them." (Related by al-Bukhari and Muslim). In another text he states, "It would have been enough for you to strike the ground with your hands, blow into them, then wipe your face and hands up to the elbows." (Related by ad-Daraqutni.)
This hadith shows that one strike of the earth is sufficient, and one only wipes the arms to the wrists. It is from the sunnah that one who makes tayammum with dirt should blow into his hands first and not make his face dusty or dirty.
After doing so, he is pure and may do any of the acts requiring prior purification, such as praying and touching the Qur'an. He does not have to perform it during the time of prayer, and he may pray as many prayers as he wishes (unless he nullifies it), exactly as he can after performing the regular ablution. Abu Dharr reported that the Prophet said, "The soil is a purifier for a Muslim, even if he does not find water for twenty years. Then if he touches water, that is, to make ablution, and so on, it would be good." This is related by Ahmad and at-Tirmidhi, who said it is sahih.
In addition to the presence of water, everything that nullifies the ablution nullifies tayammum. If a person prays after performing tayammum and then finds water, he does not need to repeat his prayer even if there is time left to do so. Abu Sa'eed al-Khudri said, "Two men went out on a journey. The time of prayer came and, as they had no water, they performed tayammum. Then they found some water during the time of the same prayer. One of them repeated his prayer with ablution and the other did not. When they saw the Messenger of Allah, they asked him about the proper procedure in such a case. He said to the one who did not repeat his prayer, 'You have acted according to the sunnah and your prayer is sufficient for you.' He said to the other, 'You will get a double reward."' (Related by Abu Dawud and anNasa'i.) If one comes across water before he prays or finishes his prayer with tayammum, his prayer becomes null and void, for he must make ablution with water. If a person is not clean because of sex or a wet dream, or a woman is menstruating, and they pray after performing tayammum, they need not repeat their prayer after finding water, but they must perform ghusl with water when they can. 'Umar said, "The Prophet led the people in prayer, and afterwards saw a man who had not prayed. He said, 'Why didn't you pray with us?' The man replied, 'I was sexually unclean and there was no water.' He told him, 'Use the soil, and it will be enough.' 'Imran then mentioned that they later found water. The Prophet, upon whom be peace, brought a bowl of water for the man and told him to perform ghusl. (Related by al-Bukhari.)