Explanation: The focus mode determines if and how the D5100 tracks focus continuously for moving subjects.
The following description of possible values is valid for taking pictures through the viewfinder, not in Live View mode.
AF-A: The D5100 tries to recognize moving subjects and decides automatically if it switches to continuous tracking or not.
AF-S („single auto focus“): The D5100 focuses only once when you press the shutter release button halfway and will then keep the focus until you release the button and press it again halfway.
AF-C („continuous auto focus“): The D5100 focuses continuously to track moving subjects as long as you keep the shutter release button pressed halfway.
In the custom setting menu a1 AF-C priority selection you can choose if you can shoot any time or only when focusing is successful.
With the settings AF-S and AF-A the shutter will be released only when focusing was successful.
Recommendation: AF-A is a clever automatic and good basic setting. But I switch to AF-C if I want to ensure that the focus is adjusted continuously without any delay at the beginning.
Secondly AF-A does not allow to focus on a point that you select and then recompose the picture and maintain the focus. If you want to avoid that focus adjustment sets in automatically you have a reason to switch to AF-S.