Unlike in humans, whose voice box is the larynx, birds have a different bony structure called the syrinx with which they produce sound. They do still possess a larynx but it does not contain any vocal chords.
This syrinx is located at the top of the two bronchi from the lungs, at the bottom end of the trachea or windpipe and has several membranes attached to it, which vibrate when air is passed over them, as well as sets of muscles. These muscles change the shape and length of these membranes, resulting in different sounds depending on their shape and tension.
Similar to a guitar, whose strings produce different sounds depending on length and tension, the tension and length of the membranes in a birds syrinx produce different songs. The frequency, or pitch, and intensity, or loudness, of a birds song is controlled by the actions of the syringeal muscles on the membranes of the syrinx and the air pressure moving over them from the lungs.
Not all birds have a syrinx, nobody ever heard a stork or vulture sing, but in those that do the more syringeal muscles they possess the more complex their sounds are.