One of the most common causes of this sort of behaviour is something such as a grass seed stuck up their nose. We most often see this over summer, but it can occur at any time of year. Is it just one nostril or both that seem to be causing the problem? How long has it been happening for?
We can also see less common causes such as infections or tumours, but the majority have a less sinister cause.
It is worth having the dog examined by your vet. They may sedate or anaesthetise your dog to examine the nostrils. Depending on what they see, it may simply be a case of removing a grass seed, or if they are concerned about something else they may take some samples for the lab to examine, and maybe some xrays.