What Is Prayer?
Prayer is a very simple thing: communication with Allah ta'ala. Though often directed heavenward, from man to God, the reverse can also be true. Therefore, prayer is not a mere repetition of words, a position of the body or a means to participate in a religious society. Prayer is the human heart before its maker. It is appropriate any time and ideally, all the time.
Second, though Allah hears the prayers of all who sincerely call upon him (Zabur/Psalm 145:18), to those who know him, he becomes like a loving father, even while retaining his exalted status as God Almighty whom we can comprehend only in part. In fact, fatherhood began not with the birth of human babies, but through the Most High himself (Ephesians 3:14-15). The more we know and follow his ways, the more we understand him to be our spiritual Father, the creator of our souls. Isa al-Masih, therefore, said this about prayer:
… when you pray, don't be a hypocrite, like those who love to stand and pray so visibly in prayer halls and on street corners. They simply want others to notice them. … Instead, enter a secluded room, shut the door, and pray to your unseen Father. Then, your Father who sees what is done in secret will reward you. And do not prattle on like pagans, who imagine their lengthy prayers will attract Allah's attention. Don't imitate them, for your Father knows what you need before you ask him. So, this is how you should pray: “Our Father in heaven ….” (Matthew 6:5-9)
Isa also said this about prayer:
“And so I tell you, keep asking and you will receive. Keep seeking, and you will find. Keep knocking, and the door will be opened to you. For everyone who asks, receives, and everyone who seeks, finds, and to everyone who knocks, the door will be opened. You who are fathers, if your son asks for a fish, do you instead hand him a snake? Or if he asks for an egg, do you give him a scorpion? So if you, sinful as you are, know how to give good gifts to your children, how much more will your heavenly Father give his Holy Spirit to those who ask him.” (Luke 11:9-13)
Those are the basics. Sometimes, however, children ask their parents for harmful things. Allah does not promise to give us those. At other times, like foolish children, we wander away from him. We may claim to follow Allah, but we pray only to satisfy our greed and lust. Allah will not answer such prayers (Yaqub/James 4:1-3). Instead, he may draw back or even oppose us, hoping that we change our ways.
You adulterous people, don't you know that friendship with the world means enmity against God? … That is why Scripture says: “God opposes the proud but shows favor to the humble.” Submit yourselves, then, to God. Resist Iblis, and he will flee from you. Come near to God and he will come near to you. Wash your hands, you sinners, and purify your hearts, you double-minded. Grieve, mourn and wail. Change your laughter to mourning and your joy to gloom. Humble yourselves before the Lord, and he will lift you up. (Yaqub/James 4:4, 6-10)
Finally, there are times when, asking with a pure heart for what is good, Allah says no in lieu of something better. That happened to Paul when he asked for relief from distress (2 Corinthians 12:7-10). Whether with a yes, no, or wait, Allah always responds graciously to the prayers of his children.