At times you may notice odd sounds coming from your computer. These can be anything from clicks to buzzes, to small squeaks that happen either continuously, intermittently, or in response to various tasks you may be performing on the system. Most of the time these noises are harmless; however, there are times when you should consider addressing them.
Keyboard and mouse squeaks
One of the most annoying sounds a computer can make is when there is a problem with an input button or device. If there is any odd binding or obstruction in a key on your keyboard or mouse, the key may squeak or make a mild crunching sound when depressed. Usually this just requires cleaning or other clearing of the obstruction, which can be done by using compressed air to clean the keyboard. In extreme cases you can pry up the keys from the scissor arms they rest on and clean the button and hinge assemblies, but this can break the keyboard if you are not careful. The folks over at PowerBookMedic have a small how-to on doing this for Apple's keyboards, but keep in mind that this procedure may be specific for a given keyboard model before attempting to try it.
Perhaps the most common variable sound heard from computers is the hard drive. In normal use the drive will make a mild chattering and grinding sound, that is usually intermittent but which depends on the task being performed. If you start noticing degraded computer performance with high levels of this chattering noise, then you probably either have a relatively full hard drive or have run out of RAM for the applications you are using.
If the hard drive is making any noticeable noises other than this chatter, including clicks and clanks, then you should back up all data on it (including all partitions, such as Boot Camp) and consider replacing the drive. Here are some warning sounds you may hear from a variety of manufacturer's drives: http://datacent.com/hard_drive_sounds.php
Besides hard drives, the fan noise on desktops is another common sound. You should hear a steady whir that may increase or decrease in volume depending on how much the computer is being used. As components get hot, the system will increase the air-flow rate to compensate. However, if there are some settings problems (specifically, settings in the System Management Controller) you may hear the fans blowing at full speed even though there is very little load on the system. They may also seem to randomly spin up and down if there are problems with the SMC settings, so if you are experiencing these issues, try resetting the SMC on your system:
Intel-based Macs: http://support.apple.com/kb/HT3964
More information on resetting the PRAM and SMC:
Optical drive noises
The CD/DVD drive may also make random noises at times, which is usually from the laser head seating itself when the drive is initialized after being woken from a sleep state. If you have a disc in the drive, the system may pause while the drive is spun up, and you will hear expected noises from the drive when this happens. If the drive vibrates, or makes any scratching sounds, you will either need to clean it or have it serviced so it can be realigned or replaced.
You may hear some static coming through your computer's speakers. This can be anything from a soft but steady "shhh" sound to a more raspy static. Generally this does not matter much unless it can be heard even when the volume is set to low levels. Beyond steady noises are any pops that may occur when the system is initializing. These sounds can be hardware-based, but many times are software-based. Try resetting the computer's PRAM and SMC, but in addition also try removing any peripheral devices from the system and booting into Safe Mode.
To thoroughly test the hardware, boot the system into Target Disk mode (hold the "T" key at bootup), where it will be running solely off of firmware. If the noise continues, and if a PRAM and SMC reset do not fix it, then the noise is probably from some fault in the hardware. For laptops, while in target disk mode try unplugging the system to see if the power source is a factor. If there are problems with drivers and the system software, try booting into Safe Mode to see if the problem continues.
Lastly, for any audio system (desktop, laptop, or external system) try moving it to a different location. While rare, the system may be picking up interference from other electrical systems in the house, including battery backups, wall circuits, and household appliances, which sometimes can be fixed with small adjustments to the positioning of the audio components.
Circuit board noises
The last source of noise in computer systems is buzzing or chirping sounds that seem to be coming from an area of the circuit board and not directly from a device such as a hard drive or fan. While semiconductors themselves should not make any sounds, you may still hear some bizarre noises coming from circuit boards during use. These can be high-pitched whistling sounds, or chirping sounds that may be persistent, but also may only be noticeable when certain tasks are performed.
In this Apple Discussion thread a number of people have noticed such buzzing sounds coming from their Airport Extreme units when performing file transfers, and have been concerned whether or not the device is going bad.
This kind of sound is usually from the capacitors on the circuit board, which help manage the power distribution to the components of the circuit board. As different components are used, the different degree of capacitor usage may result in higher load that can cause chirps and buzzes.
If you have ever used external camera flashes, you can hear the capacitor charge with a very high-pitched whine. A similar thing is always happening on other capacitors in the system, but usually they are not noticeable. Additionally, a camera flash is being charged all at once (one cycle) whereas the capacitors on a circuit board are being tapped for power and charged at very high rates (usually 60Hz or higher), which will result in a more constant buzzlike sound. You can usually hear this or similar sounds coming from any DC power converter (the small black cube you plug into a wall socket) when it is under load.
This noise is quite common, and if this kind of noise is coming from your system the best thing to do is monitor it and see if it gets any worse. For very prominent buzzing I recommend you take the device in to be checked out, and at least be compared to other models of the same product. However, if the buzz is soft, you should not worry about it unless the sound and volume of it change over time.
Usually this kind of buzzing noise is from power supplies, though it can be from other capacitors, especially if they are just warming up. As with any uncertain noise in your system, be sure you have a complete backup of your data just in case the noise escalates to indicate a larger problem.