Brief video on- How sound travels in an acoustic guitar.
So the pitch of the notes can also be altered by the shortening or lengthening of the strings through the tuning pegs (which tighten or loosen them). The shorter/tighter the string the higher the pitch and the longer the string the lower the pitch.
When you place your finger along the frets of a guitar this can also shorten the length of the string and as such the pitch becomes higher.
![](https://s2.save4k.ru/pic/0cTO79uGfhc/mqdefault.jpg)