Nikon's autofocus (AF) Nikkor lenses predate digital SLR cameras by a few years. Nikon released the first AF lenses in 1986, and then got its digital SLR market going in the late 1990s with the Nikon D1. But the focus of any discussion of lens compatibility shouldn't be on film-era lenses and digital camera bodies, but on the lens mount and autofocus drive motor. Nikon's DSLR cameras use the Nikon F-mount, which will take all AF lenses.
AF Lenses
When Nikon began making and selling Nikkor AF lenses in 1986, the photography industry was based purely on film. These auto-focus lenses came with an autofocus contact that connected to the SLR camera body and allowed photographers to focus the lens using the camera's auto-focus mode. The autofocus coupler, a small pin that connects to the drive motor in the camera, plays an important part in the relationship between AF lenses and some entry-level Nikon DSRL cameras (see "Autofocus Motor"). Nikon later released AF-D, AF-I and AF-S Nikkor lenses. AF-D lenses recorded and measured distance information (hence "D"); AF-I lenses have a built-in autofocus drive motor and connect with cameras electronically; and AF-S lenses use Nikon's silent-wave motor technology to focus the lens from within -- not using the camera.
Lens Mount
All Nikon digital SLR cameras use the Nikon F-Mount lens mounting system. Nikkor AF lenses are built for this mount, and so will connect to any Nikon DSLR camera body. The trouble is that not all Nikon DSRL cameras can use all lens functions, once the two are connected. Don't rely solely on the F-mount as a sign that a lens is compatible. But connecting the lens means you'll be able to shoot, just not necessarily with full autofocus.
Autofocus Motor
Nikon's high-end DSLR cameras always have a built-in autofocus drive motor in the camera body, which means that the camera can focus any AF lens using its own mechanics. But to cut production costs and open the DSLR market to new buyers, Nikon began selling cameras without an autofocus drive motor with the D40 and its subsequent releases (D40x, D60, D3000, D3100 and the D5000). These cameras will take AF lenses but won't auto-focus them, which kind of defeats the purpose of an AF lens. AF-S and AF-I lenses work completely on all Nikon DSLR bodies.
Lens Compatibility
While Nikon keeps a lens chart of all of its available and current lenses on its website at all times, the chart doesn't show older lenses or older camera bodies. A few Nikon enthusiasts websites have complete lens charts online. Check Ken Rockwell's Nikon Lens Compatibility page (kenrockwell.com/nikon/compatibility-lens.htm) or film and digital compatibility chart at Nikonians (nikonians.org/nikon/slr-lens.html) before you buy an AF lens to make sure it works fully with your Nikon DSLR.
Tags: drive motor, autofocus drive, autofocus drive motor, Nikon DSLR, camera body