How does a cockatoo talk?

Humans form sound by moving wind over vocal cords in the larynx. Birds, however, have a little box called the syrinx further down in their bodies (in addition to a cordless larynx). They make sounds by fluctuating this syrinx. Cockatoos and other birds known for their mimicking capabilities have stronger muscles controlling the voice box. There really is no sound formed using the beak or tongue- everything is from the tiny box in the bird's body.

As far as intelligence goes, cockatoos do nothing more than imitate sounds they hear. While some more intelligent types of parrots (Gray parrot especially) are known for sometimes putting meaning to words, cockatoos generally only mimic words like you might mimic a tune you hear.