If your desktop PC's case gets dirty as time goes by, grime can clog the fans that keep internal parts cool. If airflow is blocked, those parts could overheat.
First, shut everything down, and unplug all cables besides the power cord. Touch a metal part of the case--such as the PCI slot cover--and then unplug the power cable. This will discharge any potential static externally, instead of damaging electrically sensitive components inside. Wear shoes, and work in an uncarpeted room.
A few more precautions can add further protection. Use a layer of rubber (such as mouse pads) between the PC and your worktable. Wear an antistatic bracelet, and connect it to a metal part of the PC chassis.
Open the PC case to clear out any grime. Many cases have side doors held in place by a single Phillips-head screw or thumbscrew; consult your manual for specific directions.
Pull out any loose clots of hair, dirt, or other obstructions. Then use a can of compressed air to blast anything else away and out of the PC. Keep 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.
Blow grime up and out of the case if possible, but focus your attention on clearing clogs at vented areas. Blast through grating, and blow from inside the PC, out through the power supply's fan, until you no longer see any dirt being cleared away.
While you're inside, make sure that internal cables are clear of vents. Use cable ties to fix them to the sides. Reclose the case, and reconnect everything.
To slow future dirt accumulation, try to keep your PC off the floor, since that's where much of the grime originates. Repeat this cleaning process annually, especially if you have pets.