I’m guessing that the main reason that whistling comes easily to me is because I learned how to play trumpet in Elemantary school and continued through my high school years. The fine motor control of the lips needed for both activities is pretty much the same since the amount of lip tightness is what controls whether the sound comes out at higher octaves or lower octaves.
This is why buglers can get such a variety of notes with no valves to press. Obviously it’s more limited than either trumpets or other brass but they can get quite a variety of notes without any valves.
So that’s the basic skill needed for whistling. You can’t just pick up a trumpet and blow through it as you would a straw and expect to get anything put of it.
So I’m assuming that those who have not picked up whistling on their own are most likely just blowing (as they would to extinguish a candle) and wondering why no sound comes out. Once someone makes them aware of the need to force air through tightened lips, they can begin rudimentary whistling and refine it from there (assuming they can sing and aren’t tone deaf. If they are, then all bets are off)
I honestly don’t know of anyone taking music lessons who couldn’t get the necessary sound from a brass instrument when a teacher instructs them. After that it’s just refinement of technique.
This is also one of the aspects that separates truly exceptional brass players like Louis Armstrong or Winton Marsalis from the rest.
Timing plays a part too, but most of it is lip and breath control since there are only so many possible combinations of the three valves available to all. The rest is all about control. The fancy term associated with this is ombachure (sp?) but what it boils down to is lip control.
Same thing for whistling. Practice makes perfect :)
But you do need to know the basic rudimentary technique which I think anybody is capable of doing, if instructed properly.