It just reduces the amount of virus which can reproduce in your nasal cavities, giving your innate immune response a better chance at fighting it off before it gains a foothold. I've mostly seen it recommended as something to do after significant exposure events like being among large crowds indoors.