Back when people chopped the heads off of their homegrown chickens before plucking, frying, and eating them, something was commonly known that nowadays most of us haven't heard of. That is, when a chicken's head is axed off and the body is flopping around on the ground, the chicken still squawks. Moreover, the sound doesn't come from the chicken's severed head. It issues from the body.
We tend to think that birdsong is whistling, and we know that when we whistle, the sound is made in our mouths. The headless-chicken story is enough to suggest that birdsong is something other than mere whistling. In fact, birds have a song-making organ that other animals, including humans, do not, and it's called the syrinx.
As is the case with humans and most other higher animals, when air enters a bird's nostrils and mouth, it flows through a tube called the trachea, which leads to the lungs. Like humans, birds possess two lungs. Where the trachea forks, with each branch leading toward one lung, that's where the bird's syrinx is located.
The syrinx is shaped like an upside-down, hollow Y. If a bird wants to sing or squawk, it tightens up its syrinx muscles so that air moving through the syrinx is squeezed. This causes a membrane inside the syrinx to vibrate, making a sound. The bird has wonderful control over its syrinx muscles, so it can produce a variety of sounds. Despite having such a simple construction, syringes (that's the plural form) are unbelievably efficient sound-makers. When humans speak, we utilize only about two percent of the air passing our vocal cords. A syrinx uses nearly 100 percent of the air passing through it.
Since birds make such a huge variety of sounds -- mere occasional grunts and hisses in Mute Swans and Turkey Vultures to brilliant serenading by Mockingbirds and Nightingales -- it's clear that some syrinxes are more developed than others.