Elder Richard G. Scott of the Quorum of the Twelve Apostles shares some of his thoughts on this subject.
Will Heavenly Father always answer my prayers?09262_000_010
Heavenly Father will always hear your prayers and will … answer them. However, His answers will seldom come while you are on your knees praying, even when you may plead for an immediate response. Rather, He will prompt you in quiet moments.
Seldom will you receive a complete response all at once. It will come a piece at a time, in packets. … As each piece is followed in faith, you will be led to other portions until you have the whole answer.
Be thankful that sometimes God lets you struggle for a long time before that answer comes. Your character will grow; your faith will increase.
It is so hard when sincere prayer about something you desire very much is not answered the way you want. … Your life will be easier when you accept that what God does in your life is for your eternal good.
Illustrations by Brad Teare