Bamidbar / Numbers 24:17
אֶרְאֶנּוּ וְלֹא עַתָּה אֲשׁוּרֶנּוּ וְלֹא קָרוֹב דָּרַךְ כּוֹכָב מִיַּעֲקֹב וְקָם שֵׁבֶט מִיִּשְׂרָאֵל וּמָחַץ פַּאֲתֵי מוֹאָב וְקַרְקַר כָּל־בְּנֵי־שֵׁת׃
I see him, but not now, I behold him, but not near. A star has stepped forth out of Yaakov, and a sceptre has risen out of Israel, and it shall crush the corners of Moav, and break down all the children of Shet (Seth).
Pshat פְּשָׁט
A star from afar
Rashi: Bilam (Balaam) sees the greatness of Yaakov (Jacob), but not now, after a time. The star is good fortune that will rise like a flying arrow, the sceptre is a king, and the one who will crush Moav is David. Ramban: this is the Messiah, who will gather the exiles of Israel from the end of the earth, as a star passes across the sky. Moav will not fall now, but at the end of days it will not escape.
How Rashi and Ramban explain it
Remez רֶמֶז
A star made of letters
Ba'al HaTurim: "and break down" (קַרְקַר), in the cipher where the first letter of the alphabet swaps with the last, gives דגדג, and that equals the name David (דָּוִד) in the numerical value of its letters. The Kedushat Levi: "star" (כּוֹכָב) is 26 (כ״ו), the number of the Name, and 22 (כ״ב), the number of letters: with the twenty-two letters of prayer Israel leaves a mark in the Name and draws kindness upon itself. So Israel by its own will makes the Eternal king over itself.
How Kitzur Ba'al HaTurim and Kedushat Levi explain it
Drash דְּרָשׁ
Far or near
Aggadat Bereshit: Bilam saw that the day of judgement destroys the wicked, so he pushed it away: "I see him, but not now". Moshe saw in that day the reward of the righteous and said: "the day is near". Midrash Tanchuma: "a star out of Yaakov (Jacob)" is the King Messiah. The mount of Esav is not given to Israel now, but in the future saviours will go up on Mount Tziyon (Zion).
How Aggadat Bereshit and Midrash Tanchuma (Buber) explain it
Sod סוֹד
A star of seventy rays
The Zohar: Bilam's (Balaam's) words are fulfilled in three times, and the last in the days of the King Messiah, when the Eternal rebuilds Jerusalem and kindles in the midst of the sky a star that swallows seventy others and shines for seventy days. The Mei HaShiloach: Bilam thought the Eternal does not look at Israel now, since He is silent when it suffers. But in every generation He saves us and cares for each one personally.
How Zohar and Mei HaShiloach explain it