There is a rating system called the IP rating which describes a products resistance to dust and water ingress.
How this is achieved? Physical barriers. One such way is solid casings (e.g. wireless devices that don’t need any openings), most devices have at least some form of interface so gaskets and sealants are used. On top of this most electronics live close to the circuit board (PCB) they are attached to so acrylic conformal coatings can be used (basically coat the entire circuit in the acrylic making it impermeable to water).
For larger devices (e.g. with tall components) potting compounds (silicone/etc) can be used (some are even heat resistant). These potting compounds totally envelope the device and are also used sometimes to thwart reverse engineering.
Latest Answers