In the case of stringed instruments like the guitar, the elastic property that determines the speed of the sound produced is its linear mass density or the mass per unit length. This is simply called the linear density. If the string's linear density is constant along the string, then the linear density is simply the total mass divided by the total length.
The string's wave speed can be regulated by varying the linear density. Tension is the other property that determines the speed of transverse waves along the string.
Note that the fundamental frequency of the string also depends on the string's length. If the string is held on a fret, for example, then its effective length decreases. That is, by changing the length of the string, the frequency can be regulated. The positions of the frets are made so that the different frequencies produced occur in a progression that is pleasing to the human ear. These different frequencies are the different musical notes. Since decreasing the string's effective length increases the frequency, the notes progress from lower to higher as different frets are held along the string.
Different strings are arranged and regulated so that their combination follows a particular pattern of fundamental frequencies. By playing different notes on the strings, different harmonics are obtained, which is the craft of playing the guitar.