Summarize:

Before beginning, it's a good idea to take a few moments to wash your hands with soap and water or an alcohol-based sanitizer. Washing your hands kills bacterial and other harmful microorganisms on them. Since this method for cleaning the nebulizer doesn't use any soap, you won't want to accidentally transfer these onto the nebulizer by cleaning it with dirty hands. See How to Wash Your Hands for tips on getting your hands as clean as possible. If you have a germ-sensitive job (e.g., healthcare worker), you may want to use the more conservative WHO guidelines for hand-washing. Most nebulizers consist of a mask or mouthpiece, a section of tubing, a few connecting pieces, and a compressed air machine. Gently take these pieces apart from each other. You only need to clean one or two pieces, not the entire machine, so don't leave them connected unless your nebulizer does not come apart.  Most nebulizers come in one of two varieties: atomizer jet and ultrasonic. Atomizer jets, the more common variety, use compressed air to disperse your medicine, while ultrasonic nebulizers vibrate the liquid medicine with soundwaves to make it into a vapor. While these two nebulizers use different mechanisms to operate, they both use similar mouthpiece/tubing setups to disperse the medicine, so the cleaning instructions are virtually identical for both.  Some nebulizers (like, for instance, smaller portable models) may have slightly different configurations. In these cases, do your best to remove the pieces that can be removed. Nearly all nebulizers will have some sort of mouthpiece or mask — this is the most important thing to remove and clean. Run some warm (not hot) water. Rinse the mouthpiece and any T-shaped connecting pieces that attach to it under the water for about half a minute to one minute, making sure that every part of these pieces gets rinsed. Do not rinse the tubing or the compressed air machine with water. The tubing is difficult to dry and the machine itself is not intended to be cleaned this way. You can, however, wipe down the outsides of these pieces with a towel. Shake the excess water off of your mouthpiece (and any T-shaped connector piece you washed) and set it on a clean towel. Allow the water to evaporate naturally. This can take anywhere from 20 minutes to an hour or two, depending on the climate. When the pieces are dry, put the entire nebulizer back together. Run air through the machine for about 10 to 20 seconds to remove any water inside. At this point, you can disconnect the mouthpiece and tubing from the compressed air machine and store both separately. A good place to store the mouthpiece and tubing is in a clean ziplock bag. The compressed air machine can be covered with a sheet or towel to keep dust off of it. Some (but not all) nebulizers will recommend that you disinfect the pieces after each day of use. Consult your model's instructions to determine whether you need to do this. Follow the steps below for this intermediate cleaning method, which is nearly the same as the steps above, but using soap:  Remove the nebulizer's mouthpiece and any T-shaped connector pieces attached to it. The tubing and compressed air machine should not be washed. Run warm water. Use mild dishwashing soap or detergent to wash the pieces for about half a minute to one minute, making sure that every part of the pieces is cleaned. Rinse for about half a minute to remove soap. Shake the excess moisture off and air-dry on a clean towel.
Wash your hands. Take the nebulizer apart, if possible. Wash the cup or mouthpiece with warm water. Let air dry. Put the machine back together and store. Optionally, wash pieces in soapy water at the end of the day.