Why Does Helium Make a Voice Sound So High?
Helium does not primarily tighten the vocal cords or make them vibrate much faster. It changes how sound behaves after the vocal cords produce it.
The vocal cords create a complex buzzing sound. The throat, mouth, and nasal passages then act as a resonating chamber that strengthens certain frequencies. These resonances, called formants, help distinguish different vowel sounds and give each voice its recognizable character.
Sound travels much faster through helium than through ordinary air. When helium fills the vocal tract, the chamber's resonant frequencies rise. The voice acquires brighter, squeakier qualities even though the basic vibration rate of the vocal cords may remain nearly unchanged.
This is why helium changes the apparent character of a voice more dramatically than its true fundamental pitch. A recording analyzed by instruments shows that the vocal cords are not simply producing every sound at a much higher frequency. A dense gas can cause the opposite effect by lowering the vocal tract's resonances.
Inhaling helium is not harmless entertainment. Breathing gas from a pressurized container can injure the lungs, and replacing oxygen with helium can cause unconsciousness or death.
The cartoon voice is not produced by shrinking the throat or changing the speaker's thoughts. The same vocal instrument is temporarily filled with a gas that makes its resonances behave differently.
Source: The Science of Sound, Thomas Rossing - Acoustics of the Singing Voice, Johan Sundberg

Basking shark (Cetorhinus maximus)
Source: Greg Skomal