All sound is made by things vibrating. The faster things vibrate, the higher the pitch of the sound produced. The vibrations being more frequent mean the frequency of the wave increases. Funny that!
The waveform on the right shows many more waves. They are more frequent, so it's a higher frequency sound that produced them. This means it has higher pitch. Notice that the amplitude of both waves is the same: they are as loud as each other.