ANSWER: Everyone will learn of God at some point in their existence. Until the time a person is called to repent they are considered unbelievers, not born again, sinners, and so on. Let us take a look at a few verses to see when God will and will not hear or answer those who pray to him. First, God's ears are open to the cries of humanity in general, as Job 34 states.
28 They forced the poor to cry out to God, and he heard their calls for help. (Job 34:28)
There are times, however, when God will not listen to those who do evil or who REFUSE to listen to HIM and reject obeying His laws and commandments.
12. Because the eyes of the Lord are on the righteous, and His ears are open to their supplications. But the face of the Lord is against those who practice evil. (1Peter 3:12)
24. Because I called, and you refused to hearken, I stretched out my hand, and no one paid attention; 25. But you have despised all my counsel and would have none of my reproof. 26. I also will laugh at your calamity; I will mock when your fear comes; 27. When your calamity comes like a storm, and your destruction comes like a whirlwind, when trouble and pain come upon you, 28. Then they shall call upon me, but I will not answer; they shall seek me early, but they shall not find me. (Proverbs 1:24-28, see also Job 35:13, Proverbs 28:9, Daniel 9:13-14)
God does tell us, in no uncertain terms, that while he does not hear sinners he DOES listen to those who do his will (John 9:31).
13. And whatever you shall ask in My name, this will I do that the Father may be glorified in the Son. 14. If you ask anything in My name, I will do it. 15. If you love Me, keep the commandments - namely, My commandments. (John 14:13-15)
"But on this one will I look: On him who is poor and of a contrite spirit, and who trembles at My word." (Isaiah 66:2)
We sincerely hope these scriptures have helped shed some light on your question concerning prayers.