If you allow your PC's case to get dirty over time, grime can clog the fans that keep the internal parts cool. If this detritus blocks the airflow, those parts could overheat.
First, shut everything down and unplug any peripherals. Touch a metal part of the case to earth yourself, then unplug the power cable. This will discharge any static externally, instead of potentially damaging sensitive components inside. Wear shoes, and work in an uncarpeted room.
A few more precautions can add further protection. Place a layer of rubber (such as a few mouse pads) between the PC and your worktable. You should also wear an antistatic bracelet and connect it to a metal part of the PC chassis.
Open the computer's case. Many cases have side doors held in place by a single Phillips-head screw or thumbscrew; consult your system's manual for specific instructions.
Pull out any loose clots of hair, dirt or other obstructions, then use a can of compressed air to blast out anything else. You should hold the can upright and press the trigger in a series of short bursts. Use the nozzle straw to direct the flow close to your target. Note that compressed air consists of pressurised gases that are dangerous to inhale. Make sure you keep it away from children.
Blow grime up and out of the PC's case if possible, but focus your attention on clearing clogs at vented areas. Blast through grating, and blow from inside the computer and out through the power supply's fan until you can no longer see any dirt being cleared away.
While you're inside, make sure that the internal cables are clear of the vents. Use cable ties to fix them to the sides.
Close the computer's case and reconnect everything. Note that if you need to continue to the next section, Clean a clogged port, you should leave your devices and peripherals unconnected.
To slow down future dirt accumulation, try to keep your computer case off the floor, since that's where much of the grime originates. Remember to repeat this cleaning process annually, or more frequently if you have pets.
Clean a clogged port
Over time, the ports on your various electronic equipment can become clogged with dust and other debris. If you're having trouble getting devices to connect with your computer, cleaning any grime from the connecting ports can be a simple fix for the problem.
Turn off the hardware first. If you can see that the port is severely clogged, gently dig out the gunk with a toothpick. Remember though, ethernet, serial and other jacks rely on fragile pins, so try to move in and out on the same path instead of swirling around the sides.
For less sticky situations, use a can of compressed air to blast out loose bits. Fire at the target in short bursts.
Finish your cleaning by using a cotton swab dipped in rubbing alcohol or an electronics cleaning fluid. Then leave the device turned off for a couple of hours to dry.