ת"ר (דברים יא, יח) ושמתם סם תם נמשלה תורה כסם חיים
משל לאדם שהכה את בנו מכה גדולה והניח לו רטיה על מכתו ואמר לו בני כל זמן שהרטיה זו על מכתך אכול מה שהנאתך ושתה מה שהנאתך ורחוץ בין בחמין בין בצונן ואין אתה מתיירא ואם אתה מעבירה הרי היא מעלה נומי
כך הקב"ה אמר להם לישראל בני בראתי יצר הרע ובראתי לו תורה תבלין ואם אתם עוסקים בתורה אין אתם נמסרים בידו שנאמר (בראשית ד, ז) הלא אם תטיב שאת
ואם אין אתם עוסקין בתורה אתם נמסרים בידו שנא' לפתח חטאת רובץ ולא עוד אלא שכל משאו ומתנו בך שנאמר ואליך תשוקתו ואם אתה רוצה אתה מושל בו שנאמר ואתה תמשל בו
ת"ר קשה יצר הרע שאפילו יוצרו קראו רע שנאמר (בראשית ח, כא) כי יצר לב האדם רע מנעוריו
אמר רב יצחק יצרו של אדם מתחדש עליו בכל יום שנאמר (בראשית ו, ה) רק רע כל היום
ואמר ר"ש בן לוי יצרו של אדם מתגבר עליו בכל יום ומבקש המיתו שנאמר (תהלים לז, לב) צופה רשע לצדיק ומבקש להמיתו ואלמלא הקב"ה עוזרו אין יכול לו שנאמר אלהים לא יעזבנו בידו
תנא דבי ר' ישמעאל בני אם פגע בך מנוול זה משכהו לבית המדרש אם אבן הוא נימוח ואם ברזל הוא מתפוצץ שנאמר (ירמיהו כג, כט) הלא כה דברי כאש נאם ה' וכפטיש יפוצץ סלע אם אבן הוא נימוח שנאמר (ישעיהו נה, א) הוי כל צמא לכו למים ואומר (איוב יד, יט) אבנים שחקו מים
The Sages taught: “And you shall place [vesamtem] these words of Mine in your hearts” (Deuteronomy 11:18). Read this as though it stated sam tam, a perfect elixir. The Torah is compared to an elixir of life.
There is a parable that illustrates this: A person hit his son with a strong blow and placed a bandage on his wound. And he said to him: My son, as long as this bandage is on your wound and is healing you, eat what you enjoy and drink what you enjoy, and bathe in either hot water or cold water, and you do not need to be afraid, as it will heal your wound. But if you take it off, the wound will become gangrenous.
So too the Holy One, Blessed be He, said to Israel: My children, I created an evil inclination, which is the wound, and I created Torah as its antidote. If you are engaged in Torah study you will not be given over into the hand of the evil inclination, as it is stated: “If you do well, shall it not be lifted up?” (Genesis 4:7). One who engages in Torah study lifts himself above the evil inclination.
And if you do not engage in Torah study, you are given over to its power, as it is stated: “Sin crouches at the door” (Genesis 4:7). Moreover, all of the evil inclination’s deliberations will be concerning you, as it is stated in the same verse: “And to you is its desire.” And if you wish you shall rule over it, as it is stated in the conclusion of the verse: “But you may rule over it” (Genesis 4:7).
The Sages taught: So difficult is the evil inclination that even its Creator calls it evil, as it is stated: “For the inclination of a man’s heart is evil from his youth” (Genesis 8:21).
Rav Yitzḥak says: A person’s evil inclination renews itself to him every day, as it is stated: “And that every inclination of the thoughts in his heart was only evil all day [kol hayyom]” (Genesis 6:5). “Kol hayyom” can also be understood as: Every day.
And Rabbi Shimon ben Levi says: A person’s inclination overpowers him every day, and seeks to kill him, as it is stated: “The wicked watches the righteous and seeks to slay him” (Psalms 37:32). And if not for the fact that the Holy One, Blessed be He, assists each person in battling his evil inclination, he could not overcome it, as it is stated: “The Lord will not leave him in his hand” (Psalms 37:33).
A Sage from the school of Rabbi Yishmael taught: My son, if this wretched one, the evil inclination, encounters you, pull it into the study hall, i.e., go and study Torah. If it is a stone it will melt, and if it is iron it will break, as it is stated with regard to the Torah: “Is not My word like fire, says the Lord, and like a hammer that breaks the rock in pieces?” (Jeremiah 23:29). Just as a stone shatters a hammer, so too one can overcome his evil inclination, which is as strong as iron, through Torah study. With regard to the second part of the statement: If it is a stone it will melt, this is as it is stated with regard to the Torah: “Ho, everyone who thirsts, come for water” (Isaiah 55:1), and it states: “The water wears the stones” (Job 14:19), indicating that water is stronger than stone. §