Scientists say that as the water in the kettle boils, vortices are created by the swirling of the steam. It all depends upon the speed at which swirls of steam are funneled through the spout as the water reaches boiling point. When the steam jet becomes greater, it gets forced through the small opening and it begins to vibrate and vortices are created.
The science behind the noise the kettle makes when the water boils can offer an explanation to some other disturbing noises like the sound of trapped air in plumbing pipes or damaged car exhausts.
"Pipes inside a building are one classic example and similar effects are seen inside damaged vehicle exhaust systems. Once we know where the whistle is coming from, and what's making it happen, we can potentially get rid of it."
Scientists found that once water begins to boil in the kettle, the whistle behaves like a Helmholtz resonator. They found that above a particular flow speed, small vortices at certain frequencies produce the all too familiar whistle.