How does the auto red-eye correction work in digital cameras?
There are essentially two ways to remove red eyes with a digital camera:
While taking the picture, contract the subject eye's pupil. This can be done for any camera, not just digital: the flash blinks shortly before taking the actual picture. The main drawback of this technique is that the subject may move or close eyes completely due to the pre-flash(es).
While processing the picture (either on a computer or built-in a camera, see e.g. this article for an example. In this case, the processing algorithm just detects red eyes and replaces the red color with a neutral one like black. The main drawback of this approach is that it may lose the actual color of eyes (for example, if you expect a nice blue iris with a small pupil, you'll get a very narrow iris with a very wide black pupil).
Best is to attack the effect at the source: red eye effect is caused by a source of light close to the camera and pointing directly to the subject. See e.g. How to Avoid Red-Eye in Photos? for techniques to avoid this (bouncing the flash is simple and efficient if you have the right flash for that).
Conventional wisdom about red-eye reduction states that contraction of the pupil is responsible for reducing the amount of red-eye you get to see. Pre-flashes or focus-light action may have some of that effect but a significant part of their work mechanism is attention-catching, causing the eyes to reflexively focus on the light source. Here are two photographs made under equal conditions, with the first focused right on the camera and the second focused to some point significantly before that.
The second image shows significantly more red-eye than the first while the pupil size is not significantly different.
So why the large difference? In the first case, the image of the flash on the retina is sharp and so is the image of the camera lens. They are mostly disjoint, and due to reciprocity, the image of the camera lens is the part of the retina that the camera lens gets to see.
In the second case, the image of the flash on the retina is blurred and so is the image of the camera lens. Since they are pretty close, there is significant overlap and thus what the camera lens gets to see contains a significant amount of the retina lit by the flash.
Try it yourself. Focus on the camera versus some point far from it, either closer or by relaxing your eyes and looking wide.
Of course, an enlarged iris does also increase the "bokeh" on the retina and thus the overlap between flash image and lens image. And of course, separating lens and flash more also separates their more or less blurred images on the retina more.
But catching the visual attention, triggering the focus reflex and thus creating sharp images of camera and flash does a lot for separating what the flash causes in the eye to happen and what the camera lens gets to see.