The iris' function is to control light input to the retina, exactly the way the iris diaphragm of a camera does. It's capable of closing or opening the hole in it—the pupil—by contraction of smooth muscles that form two groups: radial dilators and peripheral sphincters.
The lens separates the posterior chamber from the much larger vitreous chamber. Fluid produced in the posterior chamber flows through the pupil to the anterior chamber and is drained away.
Monkey eye; H&E stain, paraffin section, 20x
The smooth muscle fibers responsible for opening and closing the pupil are shown in the image to the left. Contraction of a set of dilator muscles (Dilator MM) disposed fibers running radially away from the pupil opens it when light levels are low. An apposed sphincter muscle, forming a ring around the opening (Sphincter MM) does exactly the opposite: it contracts to close the pupil in bright light.
The contraction of these muscles in response to light is mediated through the autonomic nervous system. Though complete adjustment of vision to low levels of light is physiologic and takes a few minutes, the pupillary reflex is almost instantaneous.
If you've been through an ophthalmologic examination (or if you've done one) you will know that when the doctor examines the retina, he uses a bright light to illuminate it. Naturally this would trigger closure of the pupil; so he prevents it. Flooding the eye with an agent that blocks neurotransmitter receptor sites on the muscle prevents contraction of the sphincter.
The iris is pigmented to greater or lesser degree in its inner surface. This pigmentation is melanin; it's part of the complex mix of materials that define eye color. There are also a few strands of smooth muscle and some fibroblast cells in the loose CT that forms the core of the iris.
At the top of this field, you can see the mass of the lens and the lens capsule, the acellular wrapping in which it's enclosed.