If you have ever been to a high polluted country, you might have seen people there wearing a mask to protect their lungs from pollution outside their homes. China is one example, where pollution is even measured on a daily basis and announced so people can prepare themselves.
Is it the same for Japan? No, it is definitely not. The reason for Japanese wearing surgical masks is very different and varies from wearer to wearer.
As surgical masks suggest, the intention is health or hygiene. In most of the cases for Japanese it is either to protect themselves from bacteria or to protect others when one has caught a cold or even a more dangerous sickness as the flu.
Having a cold it is inevitable to sneeze, have a runny nose or to cough most of the time. If you are wearing a mask, you avoid infecting others.
Another health-reason would be to minimise the contact with pollen, when suffering from hay fever. For additional protection some wear even plastic glasses to cover the eyes and therefore to ease the itchiness caused by pollen.
Some mothers wear surgical masks too when having infants in order not to make them sick when being around them 24 hours a day.
You might have seen people wearing a mask on the plane. The question would be, are they sick, too? Some might be, but there is another possibility for passengers to wear a mask on board: due to air conditioning on the plane, the air is extremely dry. When trying to catch some zzz’s passengers often suffer from dry throats and get extremely thirsty. To fight this some passengers wear a mask to keep their throats moisturised. It is very recommendable and you should try it once!
Some masks do not have hygienic aims but are worn for fashion reasons. Gyaru’s or people who like punk fashion are sometimes spotted with cute girly ones or cool black ones just for the sake of looking cool! There are also small sized children masks with cute cartoon characters on the marked. Have you ever put on a mask? You should try it out once!