Anything that causes swelling in the nose, whether it's allergies, whether it's a cold, whether it's a sinus infection, will tend to swell the lining of the nose and the sinuses and cause blockage into the sinuses and once that happens, pressure either goes up or down in the sinuses and that's interpreted as pain by the patient. Depending on what has caused it, obviously, the treatment varies. If it's allergy, using a decongestant may well relieve the pain. If it's an infection, taking an antibiotic may treat the infection and stop the pain.
People can get quick relief by using one of the over-counter decongestant nasal sprays.
Obviously if there's an underlying problem like an allergy or an on-going infection, that needs to be treated rather than just simply treating the blockage.