Over the past generation - primarily in Israel but also to a lesser extent in the Diaspora - there has been a renewed focus on the study of Tanach. Such is a much needed antidote to the almost complete neglect of Tanach study in traditional yeshivot over the past two centuries. While many of our greatest (early) Medieval authorities (Rishonim) wrote commentaries on Tanach - Rashi, Rashbam and Ramban readily come to mind - the same cannot be said about the period of the later Rishonim or Achronim (16th- 20th century).
It was only in the 19th century that major rabbinic figures - people like the Netziv, the Mesech Chochmah and the Malbim - once again wrote biblical commentaries. Yet there is no doubt that the bread and butter of Jewish learning is the study of the Oral law - more specifically the Talmud and its myriad commentaries. A fascinating distinction between the Written and Oral law can be seen in a discussion about Nedarim, vows.
The Mishna rules that one who takes a vow not to derive benefit from another the latter may nonetheless teach him "Midrash, Halacha and Agaddah but he may not teach him Mikra, the written text of the Torah" (Nedarim 35b). Based on the verse "Behold, I have taught you statutes and ordinances, even as the Lord my God commanded me..." (Devarim 4:14) our Sages derive that Torah is to be taught without financial compensation:"Just as I [Moshe] [teach for] free so too you [must teach] free"(Nedarim 37a). Teaching Torah to others confers no "benefit", as in Talmudic terminology a benefit means a monetary benefit.
Yet the Mishna distinguishes between the Written and Oral law only allowing the teaching of the Oral law in a case when one has vowed not to benefit another. The explanation of the Babylonian Talmud is most insightful and demonstrates that there is nothing new under the sun. The Gemara explains that in actual fact one may not receive monetary benefit for the teaching of both the Written and the Oral law. It should thus be allowed to teach the Written law as no financial benefit is received. However, our Mishna is referring to the teaching of children. Since much (most?) of the time one spends teaching children is spent not in actual teaching but in "shimor" in "guarding", one may be paid for this.
As the commentary attributed to Rashi notes, the role of a teacher of children is to ensure "that they not leave and involve themselves in frivolity". Before any learning can take place the teacher must ensure proper discipline. As modern education theory has demonstrated, the most important aspect determining the success of a teacher is "classroom management". Without it very little learning will take place and it for it is for this classroom management that they are being paid. As only motivated adults come to learn the teacher can focus solely on teaching and hence is not to be paid for the teaching of Torah. Hence an adult forbidden to receive benefit from the teacher may attend a Torah class on any subject as there is no monetary benefit.
The Jerusalem Talmud (Nedarim 4:3) however, explains the obligation to teach Torah at no charge has no application to the Written law. Only the Oral law is included in chukim and mishpatim, statutes and ordinances, from whence the prohibition to derive benefit from the teaching of Torah is derived. Left unexplained is why this is so. Perhaps we can explain as follows. The Divine written law is fixed and unchanging reflecting the unchanging nature of G-d. However the Oral law is dynamic, responsive to changing circumstances, open to debate and most importantly shaped by human interpretation. There is no absolute truth in the Oral law and opposing views can both be legitimate. This is the "practical" Torah by which we live our lives. When all is said and done we base our life not on the written Torah - one in certain ways shared with other religions - but on the Oral. We imitate G-d ironically not in teaching the Written Torah but in teaching the Oral. It is the Oral law with which G-d established His covenant with the Jewish people (Gittin 60b). Hence the prohibition to receive compensation for teaching Torah only applies to the Oral law.
Of course such discussion is most theoretical perhaps applied in an era where parents were the primary educators of their children. Today when we have professional educators who choose to devote their life to teaching Torah and not some other profession it is no longer possible or desirable to have teachers teach for free. Educators are entitled to a salary befitting a professional. As Rabbi Riskin noted "if you pay peanuts you get monkeys". Rav Moshe Feinstein (Yoreh Deah 2:116) argued that refusing to accept money for teaching Torah is the advice of the evil inclination and must be ignored. Paying teachers an appropriate wage benefits all.
 For a fascinating insight and a lament as to why Tanach study was neglected see the letter (at the end of a most fascinating article) of Rabbi Eliyahu Meir Bloch Rosh Yeshiva of the Telse Yeshiva in Cleveland in which he explains that such - along with anti-Zionism and the neglect of the Hebrew language - was a most unfortunate reaction to the Haskalah and Modernity. It was the challenges brought forth by modernity that likely led these great Talmudists to pen Torah commentary.
 As in secular thought, Jewish thought divides history into different time periods with each Jewish period focusing on a particular aspect of learning i.e. the period of the Mishna, the Gemara, Talmudic commentary etc. While many assume that we are still in the period of the Achronim - it is only in historical retrospect that these periods can be noted - I believe Rabbi Aharon Rakekfet was most insightful in claiming that with the earth shattering events of the 20th century - the Holocaust and the re-birth of the State of Israel - we have entered a new period, that of the mesadrim, the organizers. Much of learning today is focused on collating the vast corpus of Jewish learning. Examples include Encyclopedia Talmudit, Otzar Haposkim, the Bar-Ilan Responsa Project and many more. Even the ArtScroll "revolution" can be seen in this light - its role is not to offer new commentary but rather to present an anthology of the commentaries of others. There is much to say about this but "this is not the place to expound".
The Gemara does offer a second explanation that the prohibition to teach mikra is referring to pisuk taamim, which may be translated as the trope, the liturgical notes used in chanting the Torah. As these (according to this view) are only of rabbinic origin one may be paid for teaching such, and hence one forbidden to derive benefit from the teacher may not attend the class.