Does God answer all prayers the way we expect? 

NO. God will only give what is best for His Children. Sometimes the answer for our prayer would be "NO" and sometimes it would be "WAIT" and sometimes it is "YES". As God has promised, He would be with His Children always and make all things work for the good.
god answers prayers in his time

Common Reasons for a "NO" or "Not Now" as answer to prayer:

God could say "NO" for a prayer request for various reasons. I have specified some of the usual reasons to hear God say a "Not Now".

1. The thing you ask for is not the best for you(Eternally)

God knows you better than you. He is the one who created you and He knows every detail about you. We see the immediate problems and circumstances, while God sees the whole picture.

Our wants, desires and longings can be based on certain misconceptions and deceitful feelings. We go by our feelings, but God goes by the facts(which we often do not know).

We have very limited understanding. We are just humans.

God is more interested in our Eternal Good than our immediate comfort in the world.
Jeremiah 29:11 - For I know the thoughts that I think toward you, saith the LORD, thoughts of peace, and not of evil, to give you an expected end.

Matthew 6:10 - Thy kingdom come. Thy will be done in earth, as it is in heaven.
Luke 22:42 - Saying, Father, if thou be willing, remove this cup from me: nevertheless not my will, but thine, be done.
God answers prayers with 'Yes',  if it is in accordance to His will. (1 John 5:14)

2. You have habitual/un-repented sins

There is no punishment or condemnation for those who are in Christ Jesus. However, God chastens us and corrects us when we sin.
He is a loving father and He knows that sin is not good for us. Sin destroys our peace and prevents us from enjoying the fullest joyful life here on earth and from receiving our best possible rewards in Heaven.

Hebrews 12:7 

4Ye have not yet resisted unto blood, striving against sin. 5And ye have forgotten the exhortation which speaketh unto you as unto children, My son, despise not thou the chastening of the Lord, nor faint when thou art rebuked of him: 6For whom the Lord loveth he chasteneth, and scourgeth every son whom he receiveth. 7If ye endure chastening, God dealeth with you as with sons; for what son is he whom the father chasteneth not? 8But if ye be without chastisement, whereof all are partakers, then are ye bastards, and not sons. 9Furthermore we have had fathers of our flesh which corrected us, and we gave them reverence: shall we not much rather be in subjection unto the Father of spirits, and live? 10For they verily for a few days chastened us after their own pleasure; but he for our profit, that we might be partakers of his holiness.

3. It is not the right time

You request may perfectly align with God's will, yet it may not be the God's perfect timing for it to be granted. God's timing is perfect. We may feel that it is getting late, but God knows the beginning and the End. Our job is to trust Him and His timing, while doing what is right in His sight. 
Ecclesiastes 3:11 - He hath made every [thing] beautiful in his time: also he hath set the world in their heart, so that no man can find out the work that God maketh from the beginning to the end.

Genesis 18:14 - Is any thing too hard for the LORD? At the time appointed I will return unto thee, according to the time of life, and Sarah shall have a son. 

Habakkuk 2:3 - For the vision [is] yet for an appointed time, but at the end it shall speak, and not lie: though it tarry, wait for it; because it will surely come, it will not tarry.

4. God is expecting you to get closer to Him

Do you have Jesus as your first love? If not, He may first want you to make Him your first love, before granting you your trivial desire. Nothing is more important than giving Jesus the first place in your life, for He Alone deserves it. Our God is a Jealous God. He loves you so much that He is hurt to see you love someone or something more than Him. 
Revelation 2:4 - Nevertheless I have somewhat against thee, because thou hast left thy first love. 

5. You hold too tight to the request 

Whatever you ask for in prayer, should never become an idol in your life. We who are saved and have the indwelling Holy Spirit in us will never worship an actual handmade idol or image. But, we can easily make an idol out of something or someone.

1 John 2:15  - Love not the world, neither the things that are in the world. If any man love the world, the love of the Father is not in him.

6. Our Sanctification and His Glory:

Sometimes God allows true Christians to suffer in problems and illness, for their sanctification and eternal good.

The sanctification of our soul is very important that the physical illness and problems on the earthly life, which is only temporary.

Sometimes God uses our sufferings for His glory and for the blessing of others

It glorifies God when you are able to praise Him, thank Him and love Him when there are so many problems in your life. This way, you bear witness to others and help them understand God and the peace that He gives, irrespective of your circumstances.