Japanese people can often be seen wearing "surgical" masks in public, covering their nose and mouth. There are two basic reasons for wearing them.
Allergies: Many people suffer from pollen and dust allergies, so they wear masks when outside to limit their exposure. A number of other products exist to cope with allergies too, such as glasses with a subtle rim that make them more like swimming goggles to keep allergens away from the eyes.
Stopping the spread of infections: It is considered polite to wear a mask if you have a cold or any other type of bug that makes you cough and sneeze. The effectiveness of masks for preventing the spread of such infections to others is somewhat questionable, but even if it doesn't work putting one on shows consideration for others.
Masks are cheap and available at every pharmacy and convenience store. To wear one put it over your mouth and nose, and then press it down around you nose. There will be a little stiff section around the nose that you bend into shape. It holds the mask in place and also stops your breath going straight up and fogging your glasses.