Each peg corresponds to a string. They control the tension of the strings and help determine the sound's pitch. Depending on the direction you pull it in, you get a higher pitch, or a lower sound
Step-by-step explanation:
Just something i have learned from having experience in playing the acoustic guitar. I hope this is helpful to you :)