Any mask is better than no mask but...
Some masks are better at protecting you from Covid-19 than others.
How good a mask is depends on two aspects:
1. How well it filters the air you breathe
2. How tightly it fits
This means that loose cloth and surgical masks offer low levels of protection.
Better protection is offered by respirator masks. These are masks rated FFP2/N95/KN95 and above. Respirator masks can have ear loops or head straps, but those with head straps usually fit tighter and produce a better seal, so provide better protection.
Respirator masks are named according to how well they filter the air.
In Europe, masks that filter at least 95% of airborne particles are called FFP2
In the US/Canada, the equivalent masks are called N95
In China, the equivalent masks are called KN95
Masks that filter at least 99% of airborne particles are called FFP3 masks in Europe.
In the US/China they are called N99 masks
In China they are called KN99 masks
The masks with the highest filtration capacity are called N100/P100 masks. You may also hear them referred to as elastomerics. They don't tend to come in disposable forms and instead have plastic or rubber frames with changeable filters.
*Note that some respirator masks may have exhalation valves. These mean that the air you breathe out is not filtered, so the mask only protects the wearer and not those around them.