What Is Autofocus?
Autofocus (AF) is the feature of a camera that tries to ensure that your chosen subject is sharp within the photo. Sensors detect how far away the subject is from the camera, and this information is relayed to the lens, which then uses an electronic motor to adjusts the focal distance of the lens. Most point and shoot cameras are autofocus only, but all DSLRs and mirrorless cameras have the option to disable AF if desired.
The first autofocus cameras were developed in the late 1970’s and their speed and accuracy has been improved greatly since that time. These days cameras have incredibly complex, dedicated AF sensors that analyze the scene through the viewfinder and predict what it is that you are trying to focus on. Once they have locked onto a subject, focus can be maintained on a moving target which makes it particularly useful for sports photography.
Whilst pocketable point and shoot cameras typically lack changeable AF settings, modern DSLRs have a great many, including a way to select from a variety of AF Points within your viewfinder. Complex algorithms can try to predict what it is that you want to focus on, or you can improve the accuracy by selecting a point, or group of points, that lies where your subject is. The camera will focus on whatever is behind your chosen AF point.
Modern cameras use what is called passive AF, where the AF sensor analyzes the image coming in through the lens using one of two methods; contrast detection or phase detection. More information on these methods is also available in the glossary.
Footnote: Although the vast majority of cameras have an autofocus option, Leica cameras which use the M-Mount, do not. The same is true for other rangefinder style cameras like the Hasselblad X-Pan system. Many professional video cameras also lack autofocus! All of your favourite Hollywood movies are shot on cameras the require someone to manually change the focus of the lens while the subject is moving. See focus puller.