Cleaning your electronic components can be a tricky endeavour, care must be used when selecting what liquids and methods can be or shouldn’t be used. Some methods should only be used in specific situations. To learn more read on.
Water
Water can be useful for certain types of components - most VLSI components are safe to immerse in water but components with chipsets and most mechanical components should avoid using water. Water can get under parts of the chipset and a certain amount will not dry immediately or can be wiped causing the residue to leave some corrosion which can cause a change in resistance or a short.
De-ionized or distilled water should be used - tap water can contain elements more conducive to creating further issues.
Alcohol
No you should not share drinks with your components! Isopropyl alcohol is the preferred choice. It evaporates quickly and can dissolve some elements water cannot. Given it also contains water caution should be used.
While some PCBs can be rinsed with alcohol, the recommended method is to use a cotton swab (squeeze out excess - you should not have the swab dripping the liquid). So “apply it and then remove it using a piece of fabric (cover the PCB with the fabric and use a brush to push the fabric onto less accessible spots),” as Stack Exchange suggests.
Acetone
Acetone is not a highly recommended solution to use for cleaning components. It can dissolve polystyrene and other items used in PCBs and parts that get heated.
Compressed Air
Dust and dirt can usually be treated with compressed air, while minor grime or corrosion can be treated with a spot-cleaning. Significant corrosion, however, should be treated with baking soda.
You may need to take covers off to get to some places and you generally want to keep the nozzle a few inches away from the parts, though you can get closer when cleaning things like exhaust fans or PCBs. Make sure to keep the canister upright as you spray, and spray in short, contained bursts.
These few ways of cleaning electronic components work if used the right way with the right method for specific parts.