The Prophet (peace and blessings be on him) taught us how to do so. He told us that if we are faced with decisions in life and are unable to make up our mind, we must approach Allah through Prayer. This Prayer is called Prayer of Istikharah. It is a Sunnah or a highly recommended act. The specific method of doing it, is as follows:
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.”
Though this was just a short reminder of Salat ul Istikharah, better knowledge and greater understanding may be acheived inshaAllah by reading:
"The three abandoned prayers" by Shaykh Adnaan aali Uroor.
MashaAllah for under £5 its a fab, useful book, covering Salat ul Istikharah and its rulings, Salat ul Tawbah and its conditions and Salat ut Tasbeeh and its establishment.