Bereshit / Genesis 26:18
וַיָּשָׁב יִצְחָק וַיַּחְפֹּר אֶת־בְּאֵרֹת הַמַּיִם אֲשֶׁר חָפְרוּ בִּימֵי אַבְרָהָם אָבִיו וַיְסַתְּמוּם פְּלִשְׁתִּים אַחֲרֵי מוֹת אַבְרָהָם וַיִּקְרָא לָהֶן שֵׁמוֹת כַּשֵּׁמֹת אֲשֶׁר־קָרָא לָהֶן אָבִיו׃
And Yitzchak dug again the wells of water that had been dug in the days of Avraham his father, which the Philistines had stopped up after Avraham's death. And he gave them the same names his father had given them.
Pshat פְּשָׁט
The same names
Rashi specifies the time: these are the wells dug back in Avraham's days, which the Philistines filled in, and Yitzchak (Isaac) dug them out again, even before he left Gerar. The Netziv sees a benefit of exile here: living now by the valley itself, Yitzchak watched over the wells himself, and the locals could no longer do wrong, because he complained to the king. Hence a lesson: what seems evil to us often turns to good in time. And he gave the wells their old names so that no one could contest them: they had been held since Avraham's days.
How Rashi and Haamek Davar explain it
Remez רֶמֶז
Three wells, three Temples
Ramban asks: why does the Torah tell of the wells at such length, if in the plain sense there is neither benefit in it nor special honour for Yitzchak (Isaac), since his father did the same? The answer: the story hides the future. "A well of living water" hints at the House of the Almighty that Yitzchak's sons will build. The first well, Esek (עֵשֶׂק, "contention"), is the First Temple, over which they contended with us until they destroyed it. The second, Sitnah (שִׂטְנָה, "enmity"), is the Second Temple, against which "an accusation was written", and the third, Rechovot (רְחֹבוֹת, "wide spaces"), is the future Temple, which will be built without strife.
How Ramban explain it
Drash דְּרָשׁ
Five wells, five books
Bereshit Rabbah asks how many wells Yitzchak (Isaac) dug. Rabbi Yehuda says: four, against the four camps in which his descendants marched through the wilderness. The sages say: five, against the five books of the Torah. Esek, "contention" (עֵשֶׂק), is Bereshit, where the Holy One, blessed is He, was occupied (נִתְעַסֵּק) with creating the world. Sitnah, "enmity", is Shemot, with its bitter labour in Egypt. The well of living water is Vayikra, full of laws, Shivah is Bamidbar, and Rechovot, "wide spaces", is Devarim.
How Bereshit Rabbah explain it
Sod סוֹד
Water under the earth
The Ba'al Shem Tov, as Me'or Einayim hands it down, says: the forefathers' wells are a search for water, that is, Torah, in the earth itself, on the lowest levels. Each forefather by his quality uncovered Torah there, so that the earth would not cover the water. After Avraham's death these openings were filled in by "Philistines", forces that hide the light, and Yitzchak (Isaac) dug them out again. Ohev Yisrael adds: the names of the wells are combinations of the letters of the Torah through which Avraham drew kindness into the world. Yitzchak, whose quality is contraction, gave them the same names, so that his restraint would become a vessel for his father's kindness.
How Ba'al Shem Tov and Ohev Yisrael explain it