Where does the evil inclination come from?
(ז) רבי נחמן בר שמואל בר נחמן בשם רב שמואל בר נחמן אמר: הנה טוב מאד, זה יצר טוב. והנה טוב מאד, זה יצר רע. וכי יצר הרע טוב מאד אתמהא?! אלא שאלולי יצר הרע, לא בנה אדם בית, ולא נשא אשה, ולא הוליד, ולא נשא ונתן. וכן שלמה אומר: (קהלת ד): כי היא קנאת איש מרעהו:
(7) Rabbi Nahman said in Rabbi Samuel's name: 'Behold, it was good' refers to the Good Desire; 'And behold, it was very good' refers to the Evil Desire. (It only says 'very good' after man was created with both the good and bad inclinations, in all other cases it only says 'and God saw that it was good') Can then the Evil Desire be very good? That would be extraordinary! But without the Evil Desire, however, no man would build a house, take a wife and beget children; and thus said Solomon: 'Again, I considered all labour and all excelling in work, that it is a man's rivalry with his neighbour.' (Ecclesiastes 4:4).
(7) the LORD God formed Adam from the dust of the earth. God blew into Adam's nostrils the breath of life, and Adam became a living being.
How does the evil inclination work?
Avot d'Rabbi Natan 16
The yetzer hara is 13 years older than the yetzer hatov. While still in the mother's womb, the yetzer hara begins to develop in a person. If he begins to violate the Sabbath, nothing stops him. If he commits murder, nothing stops him. If he goes off to another sin, nothing stops him.
But 13 years later, the yetzer hatov is born. When he violates the Sabbath, it rebukes him, "Airhead [literally: "empty one"]! Don't you know it says 'Everyone who violates it will surely be put to death' (Exodus 31:14)?" If he is about to commit murder, it rebukes him, "Airhead! Don't you know it says 'Whoever sheds a man's blood, by man will his blood be shed' (Genesis 9:6)?" If he is about to engage in a sexual sin, it rebukes him, "Airhead! Don't you know it says 'Both the adulterer and the adulteress will surely be put to death' (Leviticus 20:10)?"
Reb Nachman’s Wisdom #6
The evil urge is similar to a prankster running through a crowd showing his tightly closed hand. No one knows what it is he is holding. He goes up to each person and asks, “What do you suppose I have in my hand?” Each person imagines that the closed hand has in it just what he desires most. They all hurry and run after the prankster. Then, when he has tricked them enough, that they are following him, he opens his hand. It is completely empty!
Is the evil inclination a necessary evil?
In response to their prayer a note fell to them from the heavens upon which was written: Truth, indicating that God accepted their request.
Can we control our evil inclination?
(7) Surely, if you do right, There is uplift. But if you do not do right Sin crouches at the door; It's urge is toward you, Yet you can be its master.”
Tanchuma Bereishit 7
Perhaps you will say: Why did God create the yetzer ha-ra, about which it is written, for the yetzer of man’s heart is evil from his youth” (Bereishit 8:21)? You say that it is evil; who can make it good? Said the Holy One Blessed Be He: You make it evil! Why is it that a child of five or six or seven or eight or nine does not sin, but only from age ten and on – and then he cultivates the yetzer ha-ra? Perhaps you will say: No one can safeguard himself [from being corrupted]! Said the Holy One Blessed be He: You made it evil! Why is it that, when you were a child, you did not sin and, when you grew up, you sinned? And [furthermore] there are so many things in the world that are more refractory than the yetzer ha-ra and more bitter than the lupine, and you diligently seethe it and sweeten it in water seven times until it becomes palatable – and likewise mustard and capers and many [other] things. And if you sweeten for your use [intrinsically] bitter things that I created, how much more so [could you sweeten] the yetzer ha-ra, which is delivered into your hands!
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.