All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The Istikhaarah prayer is a Sunnah that, if one must choose between permissible alternatives, one may pray two optional Rak'ahs, even if they are of the regular Sunnah prayers or a prayer for entering the mosque, and so on, during any time of the day or night, and recite therein whatever one wishes from the Quran after reciting al-Faatihah. Then one praises Allah and sends salutations to the Prophet and recites the following supplication which has been reported by Al-Bukhari and narrated by Jaabir, may Allah be pleased with him:
"The Prophet would teach us the Istikhaarah prayer for all of our affairs, as he would teach us a Soorah from the Quran. He said: 'If one of you intends over an act, he should pray two optional Rak'ahs and say: "Allahumma inni astakheeruka bi'ilmika wa'astaqdiruka biqudratika wa as-aluka min fadhlikal-'atheem, fa'innaka taqdiru walaa aqdir, wata'lamuu walaa a'lam, wa'anta ‘allaamul ghuyoob. Allahumma in kunta ta'lamu anna haathal amra khayul-lee fi deenee wa ma'aashi wa 'aaqibati amri (‘aajili amri wa'aajilih), faqdurhu lee, wayassirhu lee, thumma baarik lee feeh. Allahumma wa'in kunta ta'lamu anna haathal amra sharrul-lee fi deenee wa ma'aashi wa ‘aaqibatu amri (‘aajili amri wa aajilih) fasrifhu 'annee wasrifnee 'anhu waqdur-liya al-khayra haythu kaana thumma ardhini Bih.”
"O Allah, I consult You as You are All-Knowing and I appeal to You to give me power as You are Omnipotent, I ask You for Your great favor, for You have power and I do not, and You know all of the hidden matters. O Allah ! If you know that this matter (then he should mention it) is good for me in my religion, my livelihood, and for my life in the Hereafter, (or he said: 'for my present and future life,') then make it (easy) for me. And if you know that this matter is not good for me in my religion, my livelihood and my life in the Hereafter, (or he said: 'for my present and future life,') then keep it away from me and take me away from it and choose what is good for me wherever it is and please me with it."
There is nothing authentic concerning something specific that is to be recited in the prayer nor is there any authentic report concerning how many times one should repeat it. An-Nawawi holds that "after performing the Istikhaarah, a person must do what he is wholeheartedly inclined to do and feels good about doing and should not insist on doing what he had desired to do before making the Istikhaarah. And if his feelings change, he should leave what he had intended to do, otherwise he is not completely leaving the choice to Allah, and would not be honest in seeking aid from Allah's power and knowledge. Sincerity in seeking Allah's choice, means that one should completely leave what he himself had desired or determined.
Allah knows best.