It is a foundation of the religion (Judaism) to know that G-D causes prophecy [to occur] with people. Prophecy does not occur unless it is with a great wise person who is [full of] wisdom, great character traits, and that his or her yetzer (impulses) do not control him or her with regard to worldly things, rather he or she always overcome their yetzer (impulses) with their knowledge. Also, [this great wise person must be] someone who is full of proper broad knowledge.
A person who is full of all these character traits, perfect in his or her body (perfect for who this person is supposed to be) [to the extant] that when they enter into "The Garden" and deal with those great and abstract subjects he or she will have the proper knowledge [that will allow them] to understand and obtain [the subject matter of these great and abstract subjects]. Also, he or she will be sanctified and separate themselves from the general path of the nation that go in [the path of] darkness of time (waste their time). He or she will zealously push themselves and teach their souls that they should not even have a thought at all regarding one of the idle subjects or [things that are] a waste of time and their schemes. Rather, his or her thoughts should always be turned upward, connected to under the Throne (of G-D) [trying] to understand those holy and pure tzuros (forms) and [he or she should] look at the wisdom of G-D regarding all [that He formed], from the first creation to the [tiny bug in the] center of the Earth and then he or she will know, through them (these creations), His greatness.
[Once he or she reaches this level] immediately Ruach Hakodesh (Winds of Holiness aka a low level of prophecy) will rest on him or her. At the time that the wind rests on this person, their soul will be mixed with the level of angels that are called Ishim, they will be transformed into another person and they will understand with their knowledge that they are no longer similar to how they were, rather [he or she will realize] that they are above the level of other wise men, like it says by [King Saul] (Shmuel 1 10:6), "And you shall prophecy with them and you will be turned into another man."
Rambam tells us that one of the pillars of faith is to KNOW that G-D communicates with man and then goes on to explain how a person can reach prophecy. Also, the Rambam indirectly tells us that G-D must choose to give a person prophecy even if they do everything that he states here. It is not a given that a person who even reaches this high level of wisdom and knowledge will also attain prophecy, it is up to G-D to choose who will receive prophecy. However, only someone on this level is even an option for G-D to choose from.
What is "The Garden?" It is talked about in the Gemara (Chagigah 14b):
ת״ר ארבעה נכנסו בפרדס ואלו הן בן עזאי ובן זומא
אחר ורבי עקיבא אמר להם ר״ע כשאתם מגיעין אצל אבני שיש טהור 0) אל
תאמרו מים מים משום שנאמר 2דובר שקרים לא יכון לנגד עיני בן עזאי
תציץ ומת עליו הכתוב אומר 3יקר בעיני ה׳ המותה לחסידיו בן זומא תציץ
ונפגע ועליו הכתוב אומר 4דבש מצאת אכול דייך פן תשבענו והקאתו אחר
קיצץ בנטיעות רבי עקיבא יצא בשלום
Aher,27 and R. Akiba. R. Akiba said to them: When ye arrive at the stones of pure marble,28 say not,
water, water!29 For it is said: He that speaketh falsehood shall not be established before mine eyes.30
Ben ‘Azzai cast a look and died. Of him Scripture says: Precious in the sight of the Lord is the death
of His saints.31 Ben Zoma looked and became demented.32 Of him Scripture says: Hast thou found
honey? Eat so much as is sufficient for thee, lest thou be filled therewith, and vomit it.33 Aher
mutilated the shoots.34 R. Akiba departed unhurt.
s.v.). L. Blau (Alitjudisches Zauberwesen, pp, 115f) seeks to prove that this account of the entry of the four Rabbis into Paradise is to be understood literally (v. also J.E. vol. V, p. 683). This view is shared, among others, by J. Levy and L. Ginzberg (v. J.E. vol. V, pp. 138f). On the other hand, M. Jast. (Dictionary) and Goldschmidt consider ‘Pardes’ a figurative expression for the mystical realm of theosophy. Rashi explains that the four scholars ascended to heaven, and Tosaf. adds that it only appeared to them that they did so. Similarly, R. Hai Gaon, who discusses the whole Baraitha in a responsum (quoted by Ha-Kotheb in ‘Ein Jacob), and R. Hananel explain that the entry of the Rabbis into the ‘Garden’ was only a vision. Both these authorities refer to the comment on the passage contained in the mystical works ‘Hekaloth Rabbathi’ and ‘Hekaloth Zutarthi’ (v. J.E. vol. VI, pp. 332-3). V. further J.E. vol. IX, pp. 515f.