Surgical masks protect other people from your coughing / breathing -- they do nothing for you.
N95 masks are notoriously difficult to actually fit correctly. A mask with a filter needs to be completely sealed around your face. You should not be able to get any airflow in from the sides. The elastic is usually too weak, the masks themselves are too lightweight, and they rarely have anything but paper touching your face, so you're not going to be able to get any sort of seal with them.
The only mask that has any hope of protecting the wearer against inhaling airborne particles is a 3M-style cartridge respirator that's fitted properly. The mask should be heavy, the part around your face should be silicone or rubber, and you should be sweating enough to lubricate the mask so that it acts like a suction cup around your face.