The amount of potential energy stored in a guitar string depends on several factors, including the string's tension, length, and thickness. Thicker strings have more mass, so they store more potential energy than thinner strings. Longer strings also store more potential energy than shorter strings. Additionally, the higher the tension on a string, the more potential energy it stores.
When a guitar string is plucked, the potential energy stored in the string is converted into kinetic energy as the string vibrates. The vibrations of the string create sound waves, which travel through the air and reach our ears. The frequency of the sound waves determines the pitch of the note that we hear.