Look at the following people and ask yourself why they didn't get the answers to their prayers they were seeking:
Paul
Therefore, in order to keep me from becoming conceited, I was given a thorn in my flesh, a messenger of Satan, to torment me.
Three times I pleaded with the Lord to take it away from me. But he said to me, “My grace is sufficient for you, for my power is made perfect in weakness.” Therefore I will boast all the more gladly about my weaknesses, so that Christ’s power may rest on me.10 That is why, for Christ’s sake, I delight in weaknesses, in insults, in hardships, in persecutions, in difficulties. For when I am weak, then I am strong.
Elijah:
He came to a broom bush, sat down under it and prayed that he might die. “I have had enough, Lord,” he said. “Take my life; I am no better than my ancestors.”
Habakkuk:
How long, Lord, must I call for help,
but you do not listen?
Or cry out to you, “Violence!”
but you do not save?
David:
My God, I cry out by day, but you do not answer,
by night, but I find no rest.
David:
David pleaded with God for the child. He fasted and spent the nights lying in sackcloth on the ground. The elders of his household stood beside him to get him up from the ground, but he refused, and he would not eat any food with them.
On the seventh day the child died.
Jesus:
He fell with his face to the ground and prayed, "My Father,
if it is possible, may this cup be taken from me.
Yet not as I will, but as you will."
Yes God will give anything we ask as the bible says, but keep in mind it has to be according to his Will. That's why even at the end of Christ's prayer he said, "Yet not as I will, but as you will"
When we align ourselves with His Will, then our prayers become very different, compared to a nonbeliever. That's why once Paul understood this, he changed his tone and said he will boast about his weakness, what he was once asking God to remove.
How to Pray
Now let's look at how our Lord said we should pray:
One day Jesus was praying in a certain place. When he finished, one of his disciples said to him, “Lord, teach us to pray, just as John taught his disciples.”
He said to them, “When you pray, say:
“Our Father in heaven,
hallowed be your name,
your kingdom come,
your will be done,
on earth as it is in heaven.
Give us today our daily bread.
And forgive us our debts,
as we also have forgiven our debtors.
And lead us not into temptation,
but deliver us from the evil one.’
The prayer that Christ gave them is a perfect prayer. It is basically a DIY on how to prayer. Examine what is being said in this prayer and it will help to understand the way a Christian should be praying.
Now here is some other verse that help with understanding how to pray:
The one who doubts should not expect anything from the Lord
"But when you ask,
you must believe and not doubt, because
the one who doubts is like a wave of the sea, blown and tossed by the wind. That person
should not expect to receive anything from the Lord.8 Such a person is double-minded and unstable in all they do."
Asking for stuff for your own pleasures
"You do not have because you do not ask God. When you ask, you do not receive, because
you ask with wrong motives, that you may spend what you get on your pleasures."
Ask in Christ's name
"And
I will do whatever you ask in my name, so that the Father may be glorified in the Son. You may ask me for anything in my name, and I will do it."
Continuing to pray without stopping
"
pray continually" - 1 thes 5:17
Husbands you better buy your wives some flowers if you don't want your prayers hindered 
"Husbands, in the same way be considerate as you live with your wives, and
treat them with respect as the weaker partner and as heirs with you of the gracious gift of life,
so that nothing will hinder your prayers."
Wives should also submit to their husbands if they want favor from the Lord
"Wives, submit yourselves to your husbands, as is fitting in the Lord."
Make sure you're praying to God for His will, not to just look good in front of other church members
“And when you pray, do not be like the hypocrites, for they love to pray standing in the synagogues and on the street corners to be seen by others. Truly I tell you, they have received their reward in full.
Instead, be alone with God
"But when you pray, go into your room, close the door and pray to your Father, who is unseen. Then your Father, who sees what is done in secret, will reward you."
Just ask God once, and have faith. He already knows what you want, so asking over and over for the same thing isn't going to help you.
And when you pray, do not keep on babbling like pagans, for they think they will be heard because of their many words. Do not be like them, for your Father knows what you need before you ask him.