The pitch of sound heard depends on its frequency of the sound wave. Frequency refers to how fast the sound wave is oscillating.
A high frequency sound wave has a high pitch while a low frequency sound wave has a low pitch.
The faster the sound wave oscillates the higher the pitch. For instance, a guitar with a big heavy string will vibrate slowly and thus create a low pitch.