I'm not sure what it is within the picture's world, but in reality such a mask was famously used by Medieval/Renaissance medics in Europe. It prevented the medic from getting the disease they're fighting - and often where they went, the air was polluted with illness (what we now know to be bacteria and such), so they needed this protection. With the mask, they used long clothes, hats and gloves, similarly to defend themselves against illness.



Nowadays, there are more effective ways to protect oneself from inhailing an infected or otherwise polluted air: just think of a common gas mask.