It depends on the size of the window, but there is a transparent window material that creates a window if the opening is fairly small- say 1/8 inch or so. It is very much like white glue. Some folks do use white glue, but I have found the commercial stuff works a little easier. Both Testors and Micro-scale offer this stuff, plus there are several other brands.
In 1:144 scale, a popular scale for airliners these days, some mfgs do not actually cast open windows, they supply window images on decals. This seems to work well in that scale. Personally, for the airliners in that scale, I prefer the decaled cabin windows but transparent cockpit windows (some kits also just use decals for the cockpit).