Surgical Masks: These are loose-fitting, disposable masks that create a physical barrier between the wearer's mouth/nose and potential contaminants in the immediate environment. They primarily function as "source control," preventing the wearer from spreading respiratory droplets. They also offer some protection from large-droplet splashes.
Respirators (e.g., N95, FFP2/3): These are tight-fitting facepieces designed to create a seal around the nose and mouth. They filter out at least 95% of airborne particles, including small aerosolized pathogens. An $N95$ respirator protects the wearer from inhalation exposure. Proper use requires a "fit test" to ensure a tight seal.