Outside health care facilities, simple, inexpensive masks of similar appearance are commonly worn in heavily populated centres in East Asia. More recently, they were widely used in China, Hong Kong, and Vietnam during outbreaks of the SARS virus.
Most "real" surgical masks used in operating rooms for the purposes of reducing infection are made of paper or other non-woven material, and are discarded after each use.
Simple surgical masks can reduce the spread of bacteria in aerosols. Apart from protecting the wearer from splashes in the mouth with body fluids, they are intended to protect others from the wearer's oral and nasal bacteria. They are not designed to protect the wearer from inhaled particles.
Viral particles are far too small to be effectively filtered by the fibres of a regular surgical mask. Thus, a mask wearer would not be less likely to catch a viral disease than someone not wearing a mask. However, an already infected person wearing a mask may slightly reduce his chances of infecting others, as it may catch droplets of fluid expelled during sneeze or cough.
The NIOSH N95 standard mask is able to protect the wearer from viral particles in aerosols and airborne liquid droplets. Another benefit of masks, even ones permeable to viruses, is to remind the wearer not to touch his face. Direct skin contact after touching a surface with viruses on it (termed a fomite) may transfer viruses which are not typically airborne.
A surgical mask will trap some particles but is much less effective than a mask designed for this purpose.