How can you have a stuffy and runny nose at the same time?

See below. Stuffy nose because the nasal mucosal is swollen and inflamed. Mucous is still produced, and can pass through in spite of swollen nasal passages.
Blockage / drainage. The mucosa of the nose, or the mucous membrane, swells. That causes the stuffiness, and why when you blow your nose nothing comes out. However, the same mucosa can secrete mucous, causing the runny nose that you note.