Why don’t our eyeballs fill up with water when we swim
Although the eye’s pupil is indeed a hole in the front surface of the eye, this hole is covered in the front by a strong, transparent coating called the cornea and in the back by a fibrous, transparent object called the lens. Also, the space between the cornea and the lens is filled with a gel-like fluid called the aqueous humor. All of these layers form a watertight barrier that seals off the inside of the eyeball from the outside world. Fortunately, all of these layers are transparent, so light can still enter our eyes through the pupils, thereby allowing us to see. To ensure that they are transparent, the cornea and lens do not contain any blood vessels. Therefore, nutrients must flow to these tissues through simple diffusion from the aqueous humor.
Anatomy of the human eye. Public Domain Image, source: Christopher S. Baird.
The layers in front of and behind the pupil do more than keep water out. The cornea, the aqueous humor, and the lens all combine together to act as an optical lens that focuses light into images on the back of the eyeball (the retina). Without these layers, the whole world would look like a non-distinct blur. These layers also seal off the inner eye from microorganisms and dust that could cause infection and damage. Additionally, the inner cavity of the eye is not completely empty. Rather, it is filled with a transparent, gel-like fluid called the vitreous humor. This fluid provides pressure that helps the eyeball keep its shape, much like how filling up a balloon with enough water will help it keep its shape. Even if there were an uncovered hole leading into the eye, the eyeball would not fill up with water when we go swimming because it is already filled with this gel.