A camera focuses by moving its lens. The lens has a fixed focal length, and the camera shifts it further from or closer to the film or sensor until the image is sharp. The distance between lens and sensor changes; the lens itself does not.
The eye does the opposite. The distance from the eye lens to the retina is fixed, so the eye cannot move its lens. Instead the ciliary muscles change the shape of the lens, making it thicker and more curved for a nearby object and thinner and flatter for a distant one. Changing the curvature changes the focal length, and the image stays sharp on the retina. This ability is called the power of accommodation.
The eye's method suits it because the eyeball is a closed, fluid-filled sphere of fixed size — there is simply no room to slide the lens back and forth inside it. A flexible lens achieves the same result without anything having to move.