As was mentioned in the comments, Hillel's teaching is brought in Pirkei Avos 1:13.
It is referring to someone who is exploiting Torah for his own personal gain and therefore not learning / teaching with the correct mindset or intentions. The Maharal in Derech Chaim explains it to mean that he is merely using the Torah for his needs and his material benefit.
Rashi writes on the word "חלף" - lit. "fades away":
עבר שכרו ממנו
His reward passes from him.
This tallies with the Gemara in Nedarim 62a
וְאָמַר רַבָּה בַּר בַּר חָנָה אָמַר רַבִּי יוֹחָנָן: כׇּל הַמִּשְׁתַּמֵּשׁ בְּכִתְרָהּ שֶׁל תּוֹרָה נֶעְקָר מִן הָעוֹלָם.
And Rabba bar bar Chana said in the name of Rabbi Yocḥanan: Whoever makes use of the crown of Torah is uprooted from the world.
Uprooted from both this world and the next (see Rambam). Also refer to Rabbeinu Yonah on 1:13.
The Tiferes Yisroel puts it slightly differently, understanding the word "חלף" as "changes it". In other words, If the Torah is exploited for that person's personal benefit, the crown of Torah loses its sanctity and is instead transformed into something mundane.