How can you hear from God when you’re praying for something important? How do you recognize if God is trying to tell you something?
Thru His Word
Have you ever asked yourself, “How do I hear from God? How will I know its God speaking to me, telling me to do something or not do something? How can I hear from God?” The clearest and loudest voice of God comes from the Word of God, the Bible. Scripture tells us, “Long ago, at many times and in many ways, God spoke to our fathers by the prophets” (Heb 1:1). God spoke to the prophets and that means God authored the Old Testament. He speaks to us through the prophets and the other authors of Scripture. Jude wrote, “Beloved, although I was very eager to write to you about our common salvation, I found it necessary to write appealing to you to contend for the faith that was once for all delivered to the saints” (Jude 1:3). Apparently, others had crept in and started twisting the gospel into something altogether different, but this we know: “All Scripture is breathed out by God and profitable for teaching, for reproof, for correction, and for training in righteousness” (2 Tim 3:16).
What others say may not be what God wants to say to you, but Scripture always tells us what God wants us to hear, and we can rest assured, knowing “that no prophecy of Scripture comes from someone’s own interpretation” (2 Pet 1:20). Scripture interprets Scripture, so we must recognize that “no prophecy was ever produced by the will of man, but men spoke from God as they were carried along by the Holy Spirit” (2 Pet 1:21). If you want to be hearing from God, you’ll want to be reading God’s Word. The Bible is God speaking to you and to me. It is the clearest revelation of God’s word to us that we have, so the Bible is the best way to hear from God. 
Thru His Son
There are so many cults out there with their own translation that I cannot possibly address them all, but one thing we know is that “in these last days he has spoken to us by his Son, whom he appointed the heir of all things, through whom also he created the world” (Heb 1:2). How has God spoken through the Son of God? When you read the gospels, you read the teachings of Jesus, so that is the best way to hear from God and to hear from Jesus. It is by reading the gospels that we hear from God and from the Son of God and from the Spirit of God. Even in the Book of Revelation and some of the other letters we read about Jesus’ teachings. Remember, the Apostle Paul was taught directly by Jesus and not by man or the apostles (Gal 1:12), so since Paul received his teachings directly from Jesus, the Apostle Paul’s letters are also direct teachings to us and directly from Jesus.
Thru His Spirit
The Spirit will teach us a lot of things. He can bring Scriptures to our mind when we need them, or He can help us other circumstances where we’d be wise to avoid something. He is God speaking to us and He is God Who lives in us. The one that lives within us is infinitely greater than the one who is in the world (Satan). He is the Holy Spirit Who is God Himself dwelling in us (1 John 4:4). The Holy Spirit speaks to us about sin, convicting us of it when we do sin, or helping us avoid it altogether (John 16:8). He will teach us all the things Jesus wants us to know, so He is our Helper or Advocate when we need Him (John 14:6). God speaks to us through His Word, the Bible: He speaks to us through the Son of God and through the gospels; and He speaks to us through His Spirit, taking the Word of God and the words of the Son of God to our hearts. These all speak volumes to us, so we don’t have to wander in the dark, trying to hear from God. We can’t say, “I can’t hear from God” until we’ve received the Spirit of God, been saved by the Son of God, and read the Word of God. Therefore, there is no excuse to not hear what God is saying to us.
Sometimes we can learn from experience that this is not what God wants us to do, or that this is exactly what God wants us to do. God speaks through His Word, through His Son, and through His Spirit, but He may speak to us through our Christian experiences. If something happened in a certain case before, we might have the wisdom to not to repeat it. The Spirit might tell us, “Remember last time?” We can also hear from God through godly counsel. There is safety in having many counselors (Prov 11:14). Others may be able to share why they think God wants you to do this or that this would be a foolish decision. The question is, are we willing to humbly accept correction, or at least stop and think about it? Other Christians may have gone through similar experiences that we’re going through, so it’s to our benefit to listen to them.
God uses the Word of God and the Spirit of God to point them to the Son of God to birth the children of God and for the glory of God. God always is to be glorified (Psalm 115:1). We don’t have to search that out. God tells us that He desires that all be saved (2 Pet 3:8-10). We don’t need special revelation to know what God wants us to hear because God’s will is found in God’s Word, but if we’re not reading God’s Word, we might never know when God is trying to speak to us, meaning we’ll have trouble hearing from God.
Here is some related reading for you: 10 Great Examples of When God Spoke and Speaks 
Resource – Scripture quotations are from The Holy Bible, English Standard Version® (ESV®), Crossway Bibles. (2007). ESV: Study Bible: English standard version. Wheaton, Ill: Crossway Bibles. Used by permission. All rights reserved.