I don't own a webcam and I've never even used one, so I'm far from being an expert but when I read about a 'whistling sound' my mind is drawn to 'acoustic feedback'.
I assume that your webcam has a built-in microphone. If the sound from the microphone is coming through your speakers, the sound will keep going round and round in circles. This will lead to a whistling sound. (It's just the same as when the sound engineers put the microphones too close to the speakers at a concert).
If acoustic feedback is the cause of the problem, move the webcam (or its microphone, if they're separate) away from the speakers or turn the speaker volume down.
If the actual webcam is whistling (rather than producing a high-pitched tone through the speakers), it suggests a circuit error within the webcam itself. Simply take it back to the supplier and demand a replacement.
Chris