When in proper condition, the panes are separated by an air sealed space that reduces energy transfer in and out of a home or building, creating a multi-layer sandwich of air and glass, thereby lowering utility costs. What is happening when your glass is fogging up is that the gas or air has escaped via the failed seal, allowing a small amount of water within to create the fog.
There are a number of solutions for your foggy window problem, with varying costs. Of course you can entirely replace your windows, but that can get quite expensive. Learning to live with the fog is your cheapest option, but not only is it visually unappealing, it is also less energy efficient. Many find that the best option is to hire a trusted glass company for window glass restoration and repair.
With the variety of solutions available, it can be a lot for a consumer to try to sift through. The best remedies quickly and permanently remove the moisture from your affected windows, and not only restore insulation benefits, but also prevent further problems.
One process billed as cheaper than replacing the glass can be a risky option. It involves drilling holes to release the moisture. This works on a sunny, dry day, but guess what happens the next time it rains? Another process involves adding a desiccant to absorb the moisture. This also means more hole drilling, and the new problem that will arise later once the desiccant has already absorbed as much water as it can hold. Fog problems can persist even after this procedure, once the desiccant is saturated. Another process is something of a combination of the two aforementioned techniques, but also involves the addition of a valve to let moist air escape. The end result is not really a restoration of a sealed, insulated window, but the creation of a breathing window, where one might continue to occasionally see fog as the valve tries to keep up. Additionally, full energy efficiency cannot be restored through this method.
A better option is replacing the insulated glass, or IGU as it is commonly referred to. This leaves all of the existing frame or window components in place and allows the simple removal and replacement of the glass unit specifically. 90% of the time the glass can be replaced to exactly match the one being removed. One caveat, however: some older windows may have a specific tint or coating no longer in production.
Whichever method you choose, selecting experienced glaziers is paramount to the success of the undertaking. Be sure to select a company with years of relevant experience, good references, and a proven track record.