Setting weapons is simply a matter of bracing such piercing weapons as spears, spiked pole arms, forks, glaives, etc. so as to have the butt of the shaft braced against an unyielding surface.
The effect of such a weapon upon a charging (or leaping, pouncing, falling, or otherwise onrushing) opponent is to cause such opponent to impale itself and take double normal damage if a hit is so scored.
Character A sets her spear with its butt firmly braced upon the floor just as a giant toad hops at her (attacking); if the spear impales the creature, it will score double indicated damage (d8 x 2).
Note that in this case initiative is automatically given to the set spear as it will obviously take effect prior to any attack routine of the toad, and that two dice are not rolled, but the result of the d8 roll is multiplied by 2.