The pupil's size is controlled by the iris. In bright light, the iris muscles contract, causing the pupil to become smaller (constrict). In dim light, the iris muscles relax, causing the pupil to become larger (dilate). This mechanism is an involuntary reflex that protects the retina from overexposure to light and allows for adequate light to enter for vision in low-light conditions.