It's called the Magnifier, and has several advantages over just opening up the camera app and zooming in to get a better look at something.
Enabling it is easy: Launch the Settings app on your iPhone or iPad, navigate to General -> Accessibility -> Magnifier, and toggle on the Magnifier switch.
After that, all you need to do to use it is triple-click the Side button (or Home button, depending on your device). You can also add it to the Control Center by going to Settings -> Control Center -> Customize Controls, and tapping the green plus button next to Magnifier.
When you launch Magnifier, you'll see a camera-like interface at the bottom of the screen, but with some unique features. The slider controls the magnification of the scene in the lens frame, while the button at the bottom left turns on the flashlight so you can illuminate it. The padlock button next to that locks the focus.
Tapping the big button in the center freezes the image (a frozen image is indicated by a yellow ring around the button), allowing you to move your phone around freely and still look at the image. You can also use the magnification slider to zoom in and out of the frozen image.
Note that when you freeze an image in the Magnifier, it isn't saved to your photo album. But if you want to save the entire image, you can.
Simply tap and hold on the frozen picture and select Save Image from the contextual popup menu. You'll find a Share option in there, too.
Over on the far right of the Magnifier interface is a button made up of three circles that provides access to additional sliders for adjusting brightness and contrast.
If you suffer from color blindness or another visual impairment, you can swipe through several color schemes in this extended menu and even invert the colors to find which combination works for you.