Suppose that you have a typical laptop computer that is turned on, muted, doing pretty much nothing (e.g. no fan, CD drive, or speaker use), has pretty much nothing being done to it (e.g. no presses of the keyboard), and only has RAM and SSDs as its sources of memory. To my surprise, such a computer still makes noises. Why is this? In my time of only using computers with hard drives, I had thought that they were the main sources of noise, but I was recently shocked to discover that my SSD-only laptop isn't silent.
The noise can be coming from the coils of DC/DC converters. When there is a sudden need for more power when the CPU starts doing something, core voltage can be increased and current demand is higher. The sound can be a click, tick, or a larger burst of ticks, kind of a squealing noise, when a power converter reacts to larger power demand or reacts to lower power delivery.
There are lots of things in a computer that can make noise. But based on your surprise, I'm guessing you're not asking about normal mechanical things like fans or rotating-media hard drives.
The most noticeable noise I've come across that fits your description is related to the power-modulation in the CPU. Ironically, this is a relatively new problem. As recently at 10-15 years ago, my main concern with computer noise, especially on the laptop, was the fans and the head-seek clicking from the hard drive.
But now with SSDs and low-power modes, a laptop can theoretically be 100% silent. Except it's not!
I'm not an electrical engineer, so this is purely from deductive reasoning. But what I've found is that with the laptops where I've noticed this noise at all (of the laptops I have direct experience with, it seems worse on ASUS, not quite as bad on Acer or HP, and it seems to not happen at all on Dell…your mileage may vary depending on the exact model within each brand's line), if you actually get the computer to do something (often, just moving the mouse, or at least opening a browser window or something is enough), the noise goes away.
In other words, if you force the computer's idle circuitry to wake up and do something, the noise goes away.
At the same time, I've noticed this noise only happens on laptops that have CPUs advertised as having active power-saving modes, especially where they lower the clock speed or shut down one or more CPU cores.
My deduction is that there is something in the power-management logic that is causing some kind of power-cycling to occur at a frequency that is audible. Electronics making noise isn't all that unusual where the frequencies are in the audible range (up to 15-20 kHz). You might be familiar with high-pitched sounds from CRTs, or buzzing from 50/60 Hz fluorescent ballasts. For some reason, some engineer designed the power modulation to occur at a frequency that's within that audible range. This winds up resonating through the laptop case, enough to be heard.
For what it's worth, I would describe the sound as almost a "scratching" noise. Very different and distinct from a "click" or "whine". And I have found that other people either notice it much less than I do, or not at all (I'm very noise-sensitive…I'm not convinced my hearing is any better than anyone else's, but my brain isn't as good at filtering out annoying things for some reason).
In my own case, it was annoying enough that I returned an ASUS I'd bought, and got a Dell instead. This was a couple of years ago…I don't know if since then ASUS has gotten better or if Dell has gotten worse. :)