The secret and the essence of Salah (prayer) is to devote oneself to Allah while praying. Just as the `abd (slave) should not turn his face away from the direction of the Qiblah (direction of prayer), he should also disallow his heart from giving attention to anything except his Lord. Therefore the salve should let the Ka`bah – the House of Allah – be the direction of his body and face, and let Allah be the direction of his heart and soul. Allah shall give His attention to His slave in proportion to the level of his devotion and focus in Prayer. Thus, if he turns away from Allah (by becoming unmindful), He too shall turn away from him – truly, as you judge, shall you yourself be judged.
Devotion in Prayer is of three levels:
1- The devotion of the heart: This level safeguards the heart and rectifies its affairs from the sickness of desires and the whispers of Satan, as well as all thoughts that may nullify his Prayer or lessen its reward.
2- The devotion of Ihsan: This level is when the slave is mindful of Allah in his prayer to the degree that he becomes as if he worships Him while seeing Him.
3- The devotion of understanding: This level is reached when the slave reflects upon and comprehends the meanings of the words of Allah (i.e. Qur’an) that he recites. And, when he contemplates the details of the worship (i.e. prayer) in order to pay its due right in humility and tranquility. Even if we ponder about Surat Al-Fatihah, there is so much to think and ponder about that one can get overwhelmed. Scholars have explained seven different levels of understanding of this surah and written volumes and volumes of books on this surah alone. If this one surah requires this much pondering, then how about the whole Qur’an and what Allah Almighty has legislated for us to recite in our prayer.
If the slave successfully reaches these three levels, he will have truly established and performed his prayer in the most perfect manner and in return, he will receive the full attention of Allah.
Source: Quoted with slight modifications from Ibn Al-Qaiym The Inner Dimensions of the Prayer