By wearing a mask and socially distancing ourselves, we are doing our part to prevent the virus from spreading. Doing either or doesn't replace the other. Meaning, wearing a mask doesn't mean we can still hang around others less than 6 feet apart or staying 6 or more feet apart doesn't mean we can leave our house without a mask.
When we wear a mask, germs get filtered. Though, not all the germs get filtered but it is still better then not wearing a mask. But wearing a mask does prevent the virus from spreading. That is why countries that do wear masks like Japan or China, for example, don't have as many cases nor that many deaths. But there are people who can't wear masks for example, childeren who are younger than 2 years or people who have trouble breathing.
Image taken from this website.
The virus spreads when people are in close contact with each other (within around 6 feet). That is why it is important to be in contact with each other from afar (by devices). Social distancing helps us stay as far away from others or surfaces that are infected.
Image taken from this website.