Vayikra / Leviticus 19:18
לֹא־תִקֹּם וְלֹא־תִטֹּר אֶת־בְּנֵי עַמֶּךָ וְאָהַבְתָּ לְרֵעֲךָ כָּמוֹךָ אֲנִי יְהוָה׃
You shall not take vengeance and you shall not bear a grudge against the children of your people, and you shall love your neighbour as yourself. I am the Eternal.
Pshat פְּשָׁט
Do not take vengeance, do not bear a grudge
Rashi: taking vengeance means refusing someone who refused you yesterday, and bearing a grudge means helping him but reminding him you are not like him. Shadal: other wrongs against a neighbour are bad in themselves, but vengeance looks just. So beside it it says "love your neighbour as yourself": as you do not want others to take vengeance on you, so do not take it yourself.
How Rashi and Shadal explain it
Remez רֶמֶז
The letter "for your neighbour"
Chizkuni: it does not say "love your neighbour" (רֵעֲךָ) but "love for your neighbour" (לְרֵעֲךָ), with the letter lamed (ל): love to do him good just as you love him to do good to you. Yismach Moshe: the words "I am the Eternal" answer the question of how a heart can be split between two loves. He is One, and from love of Him comes love of those who love Him.
How Chizkuni and Yismach Moshe explain it
Drash דְּרָשׁ
The whole Torah on one foot
The Talmud: a gentile asked to be taught the whole Torah while he stood on one foot. Shammai pushed him away, and Hillel said: "What is hateful to you, do not do to your fellow, that is the whole Torah." Netziv: taking vengeance on a neighbour is like a hand cut by a knife taking vengeance on the other hand, for the whole people is one soul.
How Talmud, Shabbat and Haamek Davar explain it
Sod סוֹד
Like a shadow
Baal HaSulam: the Torah was given only after each one agreed to take on "love your neighbour as yourself" in full and to care for the needs of every other as for his own. So the whole people became guarantors for one another. Ba'al Shem Tov: the Eternal is your shadow: as you treat your neighbour, so the Supreme King treats you.
How Baal HaSulam and Ba'al Shem Tov explain it