What is this Pasuk coming to teach us?
Rashi (citing the Sifri): It hints at the episode with Chananyah ben Eizor, 1 who prophesied that the Keilim of the Beis Hamikdash that had been taken to Bavel with Yechonyah Melech Yehudah would soon be returned, to which Yirmiyah retorted 2 that, not only would those Keilim not be returned, but the Keilim that were still in the Beis-Hamikdash would be taken to Bavel as well.
Ramban: The main objective of the Pasuk is to teach us that if the prophecy does not come true, then the 'Navi' is Chayav Misah.
Seforno: It is hinting at episodes such as Eliyahu on Har ha'Carmel 3 and to that of Yehoshua, who ordered the people to go round the walls of Yerushalayim on Shabbos, and the Kohanim to carry the Aron into the River Yarden, and stand there until the people had crossed.
Why does the Torah not tell us when we are obligated to obey the Navi?
Ramban: From the question and answer stated in the Pasuk it is self-understood that if the sign and the wonder materialize, we are obligated to listen to him. 1 And if the Navi is established, we follow him even without a sign or wonder. Refer to 18:18:1:1.