Why did he take foxes?
Radak: A fox flees backwards. Therefore, when he stuck the torch between their tails, each tried to go backwards, and the torch was stuck between them. Other animals go forwards, and the torch would have slipped from between them.
Radak citing Sotah 10a: Shimshon said, a fox, which goes backwards, should punish Pelishtim, who retracted from their Shevu'ah, i.e. Avimelech's Shevu'ah to Avraham (not to harm his seed - Bereishis 21:23).
What is the meaning of "va'Yefen"?
Rashi: He turned [the tails towards each other]. Va'Yifen means that he himself turned; va'Yefen means that he turned others. The same applies to any verb that the third letter of its root is Hei, e.g. "va'Yirev ha'Am" (Shemos 1:20), "va'Yerev b'Vas Yehudah Ta'aniyah va'Aniyah (Eichah 2:5), "va'Yigel Yehudah me'Al Admaso", "va'Yegel Es Yehoyachin Bavelah" (Melachim 2:25:21, 18:11). Rashi (Shemos 1:20) - when there is a Chirik under the Yud, This is va'Yif'al (the verb applies to the subject itself). When it is va'Yaf'il (acts on another), it has a Tzeirei, i.e. Kamatz Katan (what we call it Segol 1 - PF) under the Yud,
Also Radak says that here it is Hifil, for it has six dots (Segol under the Yud and Fei - PF).
Why did he put the torch in between?
Malbim: He hinted 1 that they put a flame between two friends - "ha'Yachteh Ish Esh b'Cheiko? Ken ha'Ba El Eshes Re'ehu" (Mishlei 6:27, 29).
Seemingly, this was the best way to burn the wheat! Perhaps Malbim explains what motivated Shimshon to inflict this punishment on the Pelishtim. (PF)