First, one must offer a Prayer of two rak`ahs with the intention of seeking guidance from Allah. Then he should offer the following supplication:
"Allahumma inni astakhiruka bi`ilmika, wa astaqdiruka bi-qudratika, wa as'aluka min fadlika al-azim, fa'innaka taqdiru wala aqdiru, wa ta`lamu wa la a`lamu, wa anta `allamu-l-ghuyub.
Allahumma, in kunta ta`lamu anna hadhal-amra [here mention your case] khairun li fi dini wa ma`ashi wa `aqibati 'amri (or 'ajili amri wa`ajilihi) faqdurhu li wa yas-sirhu li thumma barik li fihi. Wa in ta`lamu anna hadhal-amra sharrun li fi deeni wa ma`ashi wa `aqibati 'amri (or `ajili amri wa ajilihi) fasrifhu `anni was-rifni `anhu, waqdur liya al-khaira haithu kana thumma 'ardini bihi.”
(O Allah, I seek Your help in finding out the best course of action (in this matter) by invoking Your knowledge; I ask You to empower me, and I beseech Your favor. You alone have the absolute power, while I have no power. You alone know it all, while I do not. You are the One Who knows the hidden mysteries. O Allah, if You know this thing (I am embarking on) [here mention your case] is good for me in my religion, worldly life, and my ultimate destiny, then facilitate it for me, and then bless me in my action. If, on the other hand, You know this thing is detrimental for me in my religion, worldly life, and ultimate destiny, turn it away from me, and turn me away from it, and decree what is good for me, wherever it may be, and make me content with it.)
After having done so, he should follow the decision that he is strongly inclined to. If he feels no such inclination, then he should choose one of the options; he can rest assured that Allah will guide his steps. It has been reported that the Prophet, peace be upon him, said, "One who asks Allah for guidance in choosing the best course of action will never be a loser."
It is not at all necessary for a person to have visions or dreams following Istikharah. However, if a person does experience a vision or dream, and he feels strongly about it, he should follow it.”