The Muslim should present himself properly before Allah, may He be exalted, when praying, bearing in mind the greatness of Allah, may He be exalted, and what he is expected to do of focusing with humility.
Ibn al-Qayyim (may Allah have mercy on him) said:
Every individual must stand before Allah twice: when he stands before Him in prayer and when he stands before Him on the Day he meets Him. Whoever stands before Him as he should in the first instance, the second standing will be made easy for him, but whoever is heedless with regard to this standing, and does not stand before Him (in prayer) as he should, that standing (on the Day of Resurrection) will be made difficult for him.
So the Muslim should not think of anything outside of the prayer when he is standing in prayer; rather his focus should be on the prayer, humbling himself before Allah. He may help himself to achieve that by means of the following:
· Achieving true sincerity towards Allah, may He be exalted. If he focuses his mind and heart on Allah, may He be exalted, and the hereafter, and loses interest in worldly matters, he will attain humble focus in his prayer.
· Bearing in mind the greatness of Allah, may He be exalted, when he is standing before Him in prayer.
· Bearing in mind the fact that Allah can see him and is watching him as he prays.
· Bearing in mind the fact that Allah, may He be exalted, is in front of His slave when he prays. al-Bukhaari (406) and Muslim (547) narrated from ‘Abdullah ibn ‘Umar that the Messenger of Allah (blessings and peace of Allah be upon him) saw some sputum on the wall of the qiblah. He scratched it then he turned to the people and said: “If one of you is praying, let him not spit in front of him, for Allah is in front of him when he prays.”
· Being keen to make one’s prayer perfect and not miss out on the reward thereof. Imam Ahmad (18415) narrated that ‘Ammaar ibn Yaasir said: I heard the Messenger of Allah (blessings and peace of Allah be upon him) say: A person may offer a prayer and nothing of it is recorded for him except one tenth of it, one ninth of it, one eighth of it, one seventh of it, one sixth of it, one fifth of it, one quarter of it, one third of it, or half of it.” Classed as hasan by al-Albaani in Saheeh al-Jaami‘ (1626).
· Reflecting upon the meanings of the adhkaar of the prayer and the verses of Qur’an that one recites in the prayer, because this is one of the greatest means of attaining presence of mind and not letting one’s heart be distracted.
· There should not be anything in the place where one prays that may distract one, such as images, adornment and sounds, especially prohibited sounds such as singing and music.
· Not wandering whilst praying, either by letting one’s mind wander or by physically looking around.
Al-Bukhaari (751) narrated that ‘Aa’ishah said: I asked the Messenger of Allah (blessings and peace of Allah be upon him) about looking around whilst praying, and he said: “That is something that the Shaytaan steals from a person’s prayer.”
According to another hadith: “Allah is turning towards His slave so long as he does not look around, so when you pray, do not look around.” Narrated by Ahmad (17800); classed as saheeh by al-Albaani in Saheeh al-Jaami‘ (1724).
Ibn al-Qayyim (may Allah have mercy on him) said:
The kind of wandering that is prohibited whilst praying falls into two categories:
1. When the mind wanders and the heart is distracted from Allah, may He be glorified and exalted, towards something other than Allah, may He be exalted.
2. When the gaze wanders and one looks around.
Both are not allowed.
Allah continues to turn towards His slave so long as the slave is focusing on his prayer, but if his mind or gaze wanders, Allah, may He be exalted, turns away from him.
· He should remember death whilst praying, so he should offer a prayer of farewell, thinking that he will never offer another prayer after that.
Ad-Daylami narrated in Musnad al-Firdaws from Anas (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) said: “Remember death when you pray, for if a man remembers death when he prays, he will strive to make his prayer good. Pray the prayer of a man who does not think that he will ever pray another prayer, and beware of any matter that may require you to offer an apology.” Classed as hasan by al-Haafiz as it says in al-Maqaasid al-Hasanah (p. 226); classed as hasan by al-Albaani in Saheeh al-Jaami‘ (849).
If a person achieves that in his prayer, nothing will ever distract him from it, and he will continue to focus on his Lord, so that the prayer becomes a delight to him and he does not leave the prayer but he is longing to pray again.
If the worshipper is not an Arab and does not know the meanings of the Qur’an or the adhkaar, then let him do his best to learn Arabic and understand their meanings, so that his reward will be more complete and he will not miss out on the virtue of reflecting upon the meanings.
Whoever is not able to do that, let him bear in mind the greatness of his Lord and humble himself when he is standing, bowing and prostrating, and standing before his Lord with humble focus, without letting his mind or gaze wander; let him realise that his Lord is watching him, and let him bear in mind death and its terrors, and let him pray the prayer of one who is bidding farewell. That will be sufficient to help him focus and not be distracted by anything other than the prayer, and to concentrate in it.
If he is not able to reflect upon what he is reciting of the Qur’an and dhikr, then let him bear these ideas in mind.
And Allah knows best.
(Source - Islam Q&A)