Iris muscles
In the iris, the 'Iris sphincter muscle' constricts the pupil, and the 'Iris dilator muscle' enlarges the pupil.
Both muscles work in reverse, controlling the size of the pupil.
Ciliary body connected to the lens
The lens of the eye is connected to the 'ciliary body' through something like a string. When the ciliary body relaxes, the inner diameter increases. When the ciliary body relaxes, the lens becomes thinner, and the refractive index decreases, allowing focus the light coming from far.
Conversely, when the 'ciliary body' is contracted, the elastic lens becomes thicker like a ball, and the refractive index increases. Then you will be able to focus on the light coming from near you.