The pupil is the black hole in the middle of the coloured part of the eye, the iris. The pupil’s function is to allow the correct amount of light into the eye to facilitate image formation and vision. The size of the pupil will vary depending on the levels of light we are seeing in. Small for bright light and large in dim light levels. So a pupil will dilate in low light levels to allow the maximum amount of ambient light into the eyes to achieve the best vision in that light level.
Pupils will also dilate if we are very scared, take certain medications or even dilate constantly and not return to normal size from tumours and vascular damage in the brain that affects the nerve pathway running to the pupil. If your pupils change in size permanently, always see your optometrist for a check to make sure everything is fine.