I’m talking about the very high pitched whistling sound people hear usually when watching TV, but that can sometimes be heard outside or anywhere else.
Well, you could be talking about a couple of sounds.
The first is a constant, very very high-pitched whine coming out of the back of the TV. You typically only encounter it in very old TVs with vacuum tube amplifiers, and if you give the set a sharp rap on the side, it may stop. This is a side effect of the horizontal deflection circuit, a high frequency sawtooth that makes the electron beam scan from side to side. Stray fields from the tubes and the plates make one or more of the tubes vibrate mechanically in their sockets, and this translates into an audible sound. It can also happen when a laminated core transformer starts to delaminate, and the core layers start “flapping” but this will generally sound more like a buzz than a metallic whine.
The other sound you hear a lot is when white letter graphics appear on the screen, and you hear a buzzing sound from the speakers, especially when the fine tuning is off. This is interference from the high voltage drivers for the electron guns, they are probably clipping or otherwise saturating and thereby creating electromagnetic interference that is getting picked up by the audio circuitry.
Both of these effects are things of the past, now with phase-locked tuners, solid state high voltage switching supplies, and the general elimination of vacuum tubes altogether… and finally the elimination of the last tube… the big one with phosphor on the face… e.g., the boob tube.
It’s the whine of the flyback transformer, which causes the beam to go back and forth across the screen at around 15 kHz.
If you hear it outside with no electronic stuff nearby, it could be tinnitus. I have a mild case of it, and mine does sound like the noise described above.