Luke 11:9-10 "And so I tell you, keep on asking, and you will be given what you ask for. Keep on looking, and you will find . Keep on knocking, and the door will be opened. For everyone who seeks, finds. And the door is opened to everyone who knocks."
The key to answered prayer is faithfulness. We must never stop praying. So often, we take for granted that the Lord's graciousness towards us when we pray. We assume that all we have to do is utter a prayer and it's good enough. Jesus insists that we keep on asking, keep on searching for answers from God, and keep on knocking on the door of heaven in order to have our prayers answered. How long do we do it? As long as it is necessary. It may be that the Lord will give us an immediate answer, or He may not ever give us the answer we are seeking in our lifetime. The promise is that if we are faithful to pray for what the Lord has laid on our hearts to pray for, we will have what we pray for. He determines when the answer will come, not us.
Don't treat the Lord as if he were your magic genie, available on demand to grant you whatever your heart desires. He is your Lord and Father in heaven. He knows best what you need, when to give it, and how. He will not deny you things you pray for according to His will for your life and those whom you may be praying for. He may not give you what you are seeking in ways you may expect or want. He knows what is best and will not spoil you with those things that are not good for you. He will not give what is outside the scope of His goodness, holiness, or love.
If you desire what the Lord desires, you will have what you pray for. Jesus would not have said it if it were not true. Don't give up praying, no matter how long it takes or impossible it may seem for your prayers to be answered. Our role is to pray and let the Lord take it from there. When you pray, don't doubt. Believe the promise given and don't give up. It is our praying that moves God to act. It is not our wants that move God to action; it is our needs.