The word prarthna (prayer) means prakrisht ki archana, i.e. putting forth your heart's desires in front of God with full faith, devotion and humility. A prayer consists of four important parts:
1. The first important part is humility. Only putting your heart's utmost desire in front of God with complete humility can cause God's power to manifest in your prayer. As long as you depend on your own knowledge and power, you will not be able to commune with God. This means that depending on other means, pride and praying only externally to show off will never help to attain God. This is why we should all be aware and mindful of our shortcomings so that we are not filled with pride while praying and we can reach near God.
2. Whichever form of God we pray to, we should know about his power and pervasiveness. Knowing the characteristics of your God will help in meditating and thinking about him. While praying, we should always have utmost faith in the fact that God will answer our prayers and fulfill our desires because he is very kind.
3. The third requirement is to be completely immersed in God. While praying, when we forget ourselves and only remember God, only then our prayers are successful. This state of being unmindful of everything but God removes all worldly obstacles between you and God and compels God to answer your prayers.
4. We should be in a state of complete thoughtlessness while praying. Till the time our mind is chaotic and wayward, our prayers do not reach God. Any kind of worldly desire, emotion or dissatisfied state creates a lot of hurdles in communing with God.
In summary, we can say that a prayer is answered by God only when there is complete devotion, faith, positive thoughts, peaceful mind and complete thoughtless except for thoughts of God.
A lot of times when we sit down to pray/meditate/chant mantras, a lot of old thoughts and memories come very forcefully into our minds. We are not able to come out of those thoughts even by trying hard. Whenever this happens, one should not get worried or impatient, but should continue doing one's chant/prayer with full devotion without fighting those emotions and memories. This happens because, during prayer, a lot of our hidden thoughts and desires (both bad and good) come to the surface. These things act as limitations of the mind and praying helps to free the mind of these limitations. At such a time, it is important to have complete faith in God and pray/chant mantras/meditate regularly. Slowly these distractions will automatically go away.