How is the pitot system drained?
Though it's often omitted from diagrams, most pitot tubes have one or more drain holes connected to the pressure chamber, and are essentially "self-draining" (water doesn't make it into the lines):
 

In addition to drains on the pitot tube itself some aircraft have separate "drip chambers" and drains for the pitot (and occasionally static) system to remove condensation or rain that got past the drains (marked as 2 in the photo below):




Regarding other contaminants, at altitude the air is generally pretty clean.
The biggest problem you'll have with contaminants in the pitot tube is usually bugs (either building a nest in the opening, or smacking into it in flight). Pitot covers can be used on the ground to prevent this (and they're also used when washing or painting aircraft to prevent water or paint from getting into the system). Often some tape serves the same purpose - but you need to be sure to remove the tape or cover before flying.