While that’s still the basic function of the windows on board your flight, the conditions in which the windows (or “portholes” if you prefer the old nautical term) have to operate, with varying air pressure and a great range of temperatures, mean that they are rather more complex than a simple pane of glass in a frame.
In fact the passenger windows aren’t made of glass at all but a double layer of acrylic. The space between the two layers helps reduce noise and is ventilated to prevent a build-up of moisture – which would spoil your view of the clouds.
Meanwhile, up in the cockpit the windows are made of real glass: bulletproof glass to be precise. That’s not because of any risk of people taking pot-shots at the plane but because of the very real risk of hitting birds during take-off and landing.
The cockpit windows gain their strength from having a laminated three-layer structure. The two outer layers are made of glass, with an inner pane of acrylic. The combination allows the windows to resist even very large impacts but means the windows are very heavy – around 45 kilos for each large pane in the main windshield of an Boeing 757.