Either the windows were defective to start with or have been damaged so that the seal has been broken. Check your warranty. This is almost impossible to fix yourself because in the factory air (or argon) with 0 moisure content is used. To repair you would have to use dry air which is not possible using atmospheric air, and seal it immediatley.
If you are not covered by any warranty or guarantee you have two options.
If the windows are old and generally not as good as they should be, replace the whole thing.
If the frames and locks are in good order, you can buy just the sealed unit replacements. However, be aware that over the years the industry standards have changed and standard units are now much deeper (bigger gap between the two panes) than they used to be and will not fit older frames.