Generally, the N95 mask offers better protection than PM 2.5. The former filters particles that have a size of 0.3 micron or bigger. In fact, N95 mask
is considered the best mask because of its 95% efficacy. It fits you better than the surgical mask, which is quite loose. This way, there will be less chance of any particle invading your lungs. The mask will protect you from carbon monoxide, allergens and germs. The 0.3 micron is around the same size as a single virus. Because of its efficiency in keeping out various particles, the N95 mask is also more expensive.
is usually used against pollution particularly when there is haze. The 2.5 refers to the minimum size of the particle that will be filtered from the mask: 2.5 microns. This means that if you are wearing such mask, you will be protected from inhaling anything that has a diameter of 2.5 microns or bigger. So while this is a good mask to use against pollutants, it will not work against the current global health problem known as COVID-19.
In conclusion, you are better off with the N95 mask whether you are trying to protect yourself from the novel coronavirus or from pollutants.