The CPU doesn't have any electronic components to make noises unless the noise is coming from the speakers.
Most likely it is your Motherboard's VRM that is next to the CPU Socket making the noise.
Also could be the GPU or PSU which can produce Coil Whine.
Another User recently also complained about the CPU making noises. I mentioned for him to look at the VRM, GPU, & PSU to isolate the noise.
Turned out to be the Motherboard's VRM components next to the CPU Socket was making the coil whine.
Coil whine occurs in High voltage electronics like capacitors and coils in the GPU, PSU, & VRM.
If it is really bad and you can definitely isolate the noise to the VRM section of the Motherboard you might try to RMA the motherboard. But most manufacturers now don't consider coil whine as a good reason to RMA a hardware. But if you mention the noise is very loud they might have you RMA the motherboard.