The reason you have a seemingly inexhaustible supply of mucus when suffering from a cold is that the mucus-producing cells lining your nasal cavity extract the stuff mostly from your blood, of which needless to say you have a vast supply. The blood transports the raw materials (largely water) from other parts of the body. Fluid from your blood diffuses through the capillary walls and into the cells and moments later winds up in your handkerchief. (This process isn't unique to mucus; blood is the highway for most of your bodily fluids) Incidentally, you produce less mucus than you may think. One experiment showed that on the peak day of a cold the average person produces about 14 grams of drippings, or roughly half an ounce.
Ninety-five percent of mucus is H2O, while the remainder is protein, carbohydrate, lipids, and miscellaneous, the proportions and nature of which vary.