Light enters the eye through the cornea (the clear front surface), then passes through the pupil (the black circular opening in the middle). The iris (the coloured part) controls how much light enters by making the pupil larger or smaller. In bright light, the pupil gets smaller (constricts) to protect the eye. In dim light, it gets larger (dilates) to let in more light.
Check: What happens to your pupils when you go from a dark room into bright sunlight?