Who were the "leaders of the people"? What was Moshe expected to do with them?
Rashi and Targum Yonasan: The "leaders of the people" refers to the judges, whom Moshe was to instruct (to take verbally) to judge all those who worshipped Ba'al Pe'or. 1
What is the meaning of "Vehoka"?
Rashi #1 and Rashbam: It is an expression of hanging (or killing - Rashbam).
Rashi #2 (in Kedoshim, 19:28): It is an expression of connecting 1 - inasmuch as by hanging someone on a piece of wood that is stuck into the ground, one connects him to the ground.
Targum Onkelos and Targum Yonasan: It means "Kill them".
Rashi: Or breaking the connection, since words often have opposite meanings.
Whom did they hang? Why did they hang them?
What does "Neged ha'Shemesh" mean?
Rashi #1: It means that they were to hang them publicly, for all to see.
Seforno: So that the people should see them being hanged and not object - a Kaparah for their failure to object when they saw the people sinning.
Targum Yonasan: It means that they were to hang them shortly before the sun began to set and to take them down the moment it set and bury them.