According to Wikipedia:
Surgical masks are primarily intended to protect the wearer from direct splashes and sprays of blood and bodily fluid as well as the release of aerosols from the wearer that may adversely impact a patient or other individual. N95 filtering facepiece respirators cleared by the Food and Drug Administration for use as surgical masks, in addition to providing respiratory protection to the wearer, are known as Surgical N95. Typical surgical masks do not provide the same level of filtration as a NIOSH approved respirator as they are neither tight-fitting or capable of providing sufficient filtration over a wide range of particle sizes. The United States Centers for Disease Control and Prevention (CDC) recommends the use of surgical masks as part of standard precautions when conducting procedures that result in aerosol generation and the patient is not anticipated to be infected with a disease known to be transmitted by small aerosols. The CDC recommends the use of NIOSH certified respirators equivalent to N-95 or greater to prevent the inhalation of infectious particles (e.g. Mycobacterium tuberculosis, Avian influenza, Severe acute respiratory syndrome (SARS), pandemic influenza, and Ebola).
Photo of surgical mask

Photo of an N95 face mask

Can wearing a medical face mask protect you against the new coronavirus? It's a question many people are asking, including pet owners who are putting canine face masks on their dogs.
If it's a regular surgical face mask, the answer is no, Dr. William Schaffner, an infectious disease specialist at Vanderbilt University in Tennessee, told Live Science.
A more specialized mask, known as an N95 respirator, can protect against the new coronavirus, also called SARS-CoV-2. The respirator is thicker than a surgical mask, but neither Schaffner nor the Centers for Disease Prevention and Control (CDC) recommend it for public use, at least not at this point.
Source: Can wearing a face mask protect you from the new coronavirus?
Here is a link to the various styles of N95 masks:
N95 Masks