Sometimes when are in salat or namaz, our attention slips away from our prayer and we begin to think about other things that distract the prayer. We may think how our day went, what we are going to do next and other everyday things. The prayer feels like it finished within a few minutes and sometimes we even forget what we prayed! These are the symptoms of the shaitan trying to infiltrate our mind and attempting to break our salat by whispering his devilish thoughts into our minds. Well how do we solve this problem?
Rasul Allah (sal Allahu alaihi wasallam) has guided us to the cure for that. The person should blow out on his left side three times and say, "I seek refuge in Allah from the accursed Satan." If the person does that, his problem will come to an end, Allah willing. When the person enters the prayer, he must firmly believe that he is standing in front of Allah. He is in private conversation with Allah. He should get closer to Allah by his stating Allahu akbar, his glorification of Allah, and his reciting of Allah's word. Also, he should get closer to Allah by means of the places of supplication in the prayer. If a person has this feeling and consciousness in him, he will approach his Lord with humility and submission to Him. He will love what Allah has of good and fear from His punishment if he fails in what Allah has obliged him to do.
So here are some tips to keep in mind
1. Blow out on the left three time saying, "I seek refuge in Allah from the accursed Satan."
2. Remember that you are having a private conversation with Allah, so try be as sincere and focused as you can.
3. Before the salat, remember to clear out all the random thoughts from your mind that might distract you during the prayer. (close your eyes, take a deep breath and breath out)
4. If you still continue to having random thoughts that is distracting your prayer try doing some dhikr in your mind (that is saying Ayuzubillahi himinashaytanirahim, Astagfirallah, SubhanAllah, Alhamdulillah, Allahu Akbar)
5. It also helps to memorize the translation of the Surahs and Dua'as in the prayer (if Arabic isn't your first language) and remembering them along with your recitation of the Surah or the Dua'a. This might also get you more focused and emotionally connected to Allah.
If this article achieves anything then all praise is all due to Allah, only the mistakes are mine :)