Last week we explained what were the three prerequisites for a person to be a candidate for prophecy (see here). Besides being a God fearing Jew, the prophet had to adjust his mind to God's reality, leaving aside his worldly reality. Being "behaviorally" wealthy, for example, meant that a person had to reach a level of complete lack of interest for material possessions. Obviously, a mind that expects to absorb God's words could not be distracted with material pursuits.
Paraphrasing rabbi Hayim Pereira-Mendes: The prophets were prayerful men. It was the habit of this spiritual communication with God, and constant meditation upon His words and ways, combined with right conduct, that qualified the inspired men and women of the Bible to receive Divine inspiration or Divine messages. Just as physical and mental exercise result in greater physical and mental development, and consequently greater physical and mental possibilities, so spiritual exercises result in greater spiritual development, and consequently greater spiritual possibilities.
According to our tradition there were schools for the training of prophets, like the one established by Shemuel the prophet. The students were called bene hanebi-im. In that school they would train to attain behavioral wealth, strength and wisdom and, according to some ge-onim, they will also train themselves in the meditation techniques which would mentally prepare them to cope with the overwhelming experience of getting a vision coming directly from haShem.
(If the reader is interested in the fascinating subject of prophecy, I would recommend Rabbi Aryeh Kaplan, z'l, marvelous books. Among them: "Innerspace" )
If a person attained such a perfection of character, he will be considered a Prophet, but not necessarily receive prophecy. From this point of view prophecy could be compared with getting a phone call from God. Having attained perfection of character is like having a cell phone on. It enables you to be a potential receiver of God's phone call. But still, God might or might not call you. That is God's prerogative.
Read "Surplus Jews" an excellent article from Jerusalem Post, by Daniel Gordis.