Standing waves on a string form from the sum of two waves, one moving down the string and the reflected wave coming back. Normally these two waves would pass along the string and the standing wave pattern would not be seen. The amplitude of the two waves would add up to give a total which would change over time as the two waves move in opposite directions. However the frequency of the speaker is the critical factor here. If it is providing pulses at just the right frequency standing waves will form. This is because the sum of amplitude of the outgoing wave at any point on the string plus the return wave produces places on the string that sum to no amplitude and other places that sum to twice the original waves amplitude. The frequencies required to do this are whole number multiples of the speed of the pulse along the string divided by two times the length of the string.
The speed of the pulse depends on the tension in the string and on mass per unit length of the string. All of this can be calculated but it is much more fun just to tweak the knob of the signal generator until he right frequencies are found.