Why do airplane windows have small holes?
Short answer
The small hole lets the air pressure between the window panes move closer to the pressure inside the cabin. It is not a hole straight through the aircraft to the outside.
How it works
Passenger aircraft windows are usually made from several transparent layers. During flight, the cabin is kept at a higher pressure than the thin air outside, so a pressure difference acts across the window.
The small hole connects the cabin side with the space between structural panes, so a large pressure difference does not build up inside the window assembly. This lets the outer structural pane carry the normal pressure load. Window designs vary between aircraft types.
Key point
The hole is an intentional engineering feature, not damage. It can also help reduce moisture and fogging between the panes.