In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Shaikh Uthaymeen [rahimahullaah] said: If someone says, ‘’We [perform] the five daily [obligatory] prayers and the optional prayers as much as Allaah wills for us, (yet) we do not find in our hearts [i.e. Taqwah etc] that which forbids us from wicked and evil deeds, and Allaah did say: [إِنَّ ٱلصَّلَوٰةَ تَنۡهَىٰ عَنِ ٱلۡفَحۡشَآءِ وَٱلۡمُنكَرِۗ – Verily, As-Salat (the prayer) prevents from Al-Fahsha’ (i.e. great sins of every kind) and Munkar (every kind of evil wicked deed, etc.)] [Surah Al-Ankabut. Aayah 45]. This is an established statement, therefore what is the answer to the question?
The answer: Indeed, the intent behind the prayer – the perfect prayer- is the one that is [performed in the manner that] Allaah and His Messenger commanded and is far removed from [the thoughts, deeds etc] forbidden by Allaah and His Messenger [in relation to the prayer].
The most important affair is Khushoo and that one’s heart is attentive, which is the substance and essence of the prayer. If a person has Khushoo and his heart is attentive [during the prayer], this will have a [good] effect after the prayer; his heart will be upright [or steadfast] and will return to its previous state [i.e. the attentiveness one had in the presence of Allaah – whilst praying – due to love of Allaah, hoping for Allaah’s Mercy and Fearing Allaah’s Punishment]; (as opposed to) when we begin the prayer – and we ask Allaah to forgive us – and straight away one is obstructed by whispers [i.e. shaytaan’s whispers and thoughts that diverts one from the prayer] and when he attempts to repel it, the whispers are flung into his heart – just as a stone is thrown into water – and completely occupies his mind; then a second whisper follows and obstructs his heart, and then another one! Therefore, I exhort myself and every Muslim to [strive] to attain Khushoo and an attentive heart [in the prayer], for indeed that will aid a person to achieve the [good] outcomes of the prayer; rather we’ll attain the praiseworthy and beautiful [outcomes] of the prayer.
[An Excerpt from ‘At-Ta’leeq Alaa As-Siyaasah Ash-Shar’iyyah’. Page 69. Slightly paraphrased]