Toothed whales produce sound by passing air through what are called the phonic lips (kind of like human sinus passageways) — creating vibrations that are channelled through surrounding tissues to the melon, a chamber located in the whale’s forehead. From there, sound is directed outwards with both control and accuracy.
Although it is not known with great detail, baleen whales, produce sound more akin to humans and other terrestrial mammals. Humans create sound vibrations by pushing air over the vocal cords and adjusting pitch and tone using the larynx. It has been proposed that like humans, baleen whales also generate sound by passing air over their vocal folds. Unlike terrestrial mammals however, baleen whales are able to create sound without breathing. For as long as 15-20 minutes for example, humpbacks can sing without releasing any air from either their mouths or blowholes by recycling air through their vocal structures.