Two of our most fundamental mitzvoth are those of Tefillah, prayer and Talmud Torah, the study of Torah. Yet there has long been a tension regarding which is of primary importance. The view that "if only one would pray the entire day" (Brachot 21a) cannot be easily reconciled with G-d's words to Joshua that, "The book of law shall not depart from your mouth and you shall meditate in its words day and night" (Joshua 1:8). The Talmud begins with masechet Brachot, detailing the laws of prayer, implying that prayer is our foundation; it spends little time outlining the exact nature of the mitzvah of Talmud Torah. According to one Talmudic opinion, one can actually fulfill the mitzvah of Talmud Torah by the daily recital of the shema (Menachot 99b).
On the other hand, the Talmud (Shabbat 9b) exempts those whose sole occupation is Torah study from the obligation to pray. Both Iyun Tefillah and Talmud Torah are listed amongst the mitzvoth for which we "reap the fruits in this world, and the principle endures to the world to come"(Siddur).
This tension plays out in an interesting exchange recorded in the daf (10a). Rava observed that Rav HaMenunah was taking a long time in prayer; yet instead of praising him for his kavanah (intense focus), Rava noted that "they abandon eternal life and involve themselves in temporal life". The pleas of prayer, be they for wealth, health, justice, or peace, are all important but relate to temporal matters. Our sojourn in this world is temporary, and one should focus, Rava felt, on that which exists beyond the realm of the physical and brings eternal life, the study of Torah. Such study can endure and inspire long after we leave this world.
However, Rav HaMenunah felt that we must balance the two; "the time to pray is separate [important], and the time to learn is separate". Both physical and spiritual pursuits have their proper place.
The debate continues with the Talmud recording the story of Rav Yirmiya sitting in front of Rav Zeira as they studied Torah together. When the time for prayer arrived, Rav Yirmiya quickly arose to prepare to pray. Rav Zeira was not impressed, quoting the verse, "He [who] sets aside his ear from hearing Torah, even his prayer will be an abomination". While this negativity towards prayer may (or may not) refer only to those who interrupt Torah study, but not to the act of prayer itself (presumably, Rav Zeira was soon going to stop teaching and pray himself), it sheds light on what he felt was the proper hierarchy of values.
As Rav Soloveitchik beautifully noted (see here), prayer and learning are fundamentally opposites. Prayer requires total surrender and total reliance on G-d, whereas Torah study requires independence of thought.
As in many a debate, there is no right or wrong answer. Those who have a natural disposition towards, and can be inspired by, prayer--not easy in the modern world, if ever--should focus their efforts on prayer. Those whose inclination and intellect move them to the realm of Talmud Torah should put most of their efforts there. Historically, this debate was a major source of friction in the battle between Chasidim and Mitnagdim, with the former stressing prayer and the latter, learning. Here, too, we can apply the dictum that what matters most is our attempt to come closer to G-d, be that through prayer, learning, or through the performance of some other mitzvah.