The pupil is the black opening in the centre of the eye. Light enters through the pupil and goes through the lens, which focuses the image on the retina. The size of the pupil is controlled by muscles. When more light is needed, the pupil is made larger. In brighter light, the pupil is made smaller. The pupil can be compared with the shutter of a camera. It is surrounded by the iris which is the colour part of the eye.
A Pupil changes its size depending on the length away that the focus point is, the focus point being the object that the eye is focusing on. Also, the light makes the pupil change its size. When it is darker, the pupils will dilate (get bigger) because they need to allow more light into the eye to see. When it is very bright, the pupil will constrict (get smaller) to restrict the amount of light there is getting into the eye so we can see. The pupil is normally black in most animals, but in some Reptiles, it can be a different colour.
The main reason why we have a pupil is because the pupil is used to let in the light so that it can travel to the Retina. The reason why it has no color is because the ray of light that travels into the pupil is being sucked in by tissues underneath the eye. Fun fact, in humans, our pupil is round, but in some animals such as cats, it is shaped like a slit. The pupil size is controlled by a muscle in our eyes. When it is dark, your pupils enlarge too get more light into it so that you can see well. If it is too bright, your pupils will shrink so that you won't get blinded by the light.