Overview
Quick Links: What Lenses Will My Camera Work With? Database of Nikon Lenses External LinksIt's a well-known fact that, within the realm of interchangeable-lens cameras, the design tends to be to where only lenses made by the same manufacturer as the camera, or with its "mount" adapted, will fit the given camera. In other words, Pentax lenses won't fit onto Canon cameras, Nikon lenses only fit on Nikon cameras, etc. Manufacturers like Sigma make lenses for many of the given brands, but any one lens will only fit whichever brand's "mount" it's designed to fit. Thus, a Sigma 50mm f/1.4 in Canon mount only fits Canon cameras, if you wish for a Sigma 50mm f/1.4 to work on your Nikon, you have to buy one that's manufactured in "Nikon mount."
There have been some steps taken towards helping make lenses "cross-compatible" in terms of being capable of being mounted on several brands of cameras, most notably by the usage of adapters, but even then, certain features like autofocus or metering often-times get compromised in the process. Thus, as a general rule, Nikon lenses only work on Nikon cameras, and if you want a certain Sigma, Tokina, Tamron etc lens for your Nikon, you have to buy one that's made with the Nikon mount.
It gets even crazier than that, though. Even within brands, you have differences. In this article, I seek to explain how Nikon lenses work in this regard. This is important, because at the least certain lenses will give reduced features vs what the body is capable of, while in some cases certain lenses can even damage the camera.
First, I will detail the terminology that differentiates the different lenses, then I will list the Nikon DSLRs & give a run-down on how the different lenses work with them.
Explanation of Nikon Lens Terminology
These are my explanations & they're relatively short & brief. This link, also the first one shown under "external links," goes into much greater detail. Do not consider my article to be a comprehensive & thorough in-depth explanation, it's merely an "overview." Also, if you need help identifying your lens, this page will help, it contains a database of practically every Nikon lens ever made.Pre-AI
Simply put, these are lenses created from 1959 to pre-1977. You can tell them by how there is 1 row of aperture-numbers near the mount, whereas later versions of the lenses have TWO sets of numbers. These are the lenses to watch out for. Many recent Nikon DSLR cameras will actually incur damage if you attempt to mount these lenses. The entry-level models, (Nikon D40/D40x/D60/D3000/D5000/D3100/D5100/D3200), the ones which require AF-S lenses for autofocusing, will accept these lenses without damage, due to slight differences in the mechanics of their mount (I don't know the specific details beyond that) but besides obviously having to focus the lenses, you also have to meter with a hand-held meter with them, or guess.
Also: sometimes you may have a lens that isn't "pre-AI," it will be "AI" etc on its own and be okay to that extent, but may have things like "extension tubes" added to them which may have pre-AI characteristics. In that case, the shortcomings (and the dangers!) inherent in pre-AI lenses themselves will be relevant in the event you use this add-ons, even if the add-ons are mounted to a non-pre-AI lens that would otherwise be okay.
AI
These are manual-focus lenses which were introduced around 1977. You can tell them by the presence of TWO ROWS of aperture-numbers near the mount, one set which is larger & another which is smaller. These will MOUNT on any recent camera but only more advanced models like the D7000, D300 etc, models with an "aperture coupling prong" (a plastic concentric ring around the lens mount), will meter with them; with the others, you will have to set the camera in full-manual mode & set the f-stops/shutter speeds based on a hand-held meter's reading (or guessing).
AF-D
These are autofocus lenses introduced in the mid 1980s or 1990s which haven't been replaced by "AF-S" lenses yet (below). They autofocus by a mechanical linkage between camera body & lens. They work fine on most current DSLRs except for entry-level models (D40/D40x/D60/D3000/D3100/D3200/D5000/D5100) without an autofocus motor in the body; with those, you will have to manually focus. Once you get to "mid-level" models like the D300 or D7000, you don't run into this limitation. As an example, for a long time, the 50mm f/1.8 lens was only available as an AF-D type (until 2011).
AF-S
Almost all current Nikon lenses are of this designation. They work fully 100% on all current models. The kit lenses like the 18-55mm VR and 18-105mm VR are AF-S. Some lenses in Nikon's current line-up haven't yet been updated to AF-S and remain AF-D, but most current lenses are AF-S.
DX
Some AF-S lenses are designated as "DX" lenses. This means they are designed for "DX" (non-full-frame) DSLRs which have a 1.5x crop factor. They will work on "FX" or "full-frame" bodies (like the D700 or D3s) but with limitations. Examples include the 55-200mm (VR or non-VR) and the 18-55mm "kit" lenses you see on the entry-level DSLRs.
FX
Any lens besides an AF-S lens designated as DX will be an "FX" lens, meaning simply enough it isn't designed specifically with "DX" DSLRs in mind. The 50mm f/1.8 AF-S and 50mm f/1.8 AF-D, for instance, are "FX" lenses simply by the fact that they're not labeled as being "DX."
VR
Certain AF-D and AF-S lenses contain optical image stabilization to help reduce image shake brought on by hand-held tremblings. These lenses are called "VR"for "vibration reduction." Canon calls their "IS" (for image stabilization). Other brands use similar designations.
Camera Compatibility Overview
This section will give an overview on what the lens compatibility situation looks like with various Nikon DSLRs. I got some help with this section from this link (the 2nd link in the "external links" section).Nikon D1, D1h, D1x
Pre-AI lenses--DO NOT USE!!
AI-Lenses--Will mount & meter (center-weighted metering, aperture-priority or manual modes)
AF-D--Full functionality
AF-S--Full functionality
DX--work as intended (with a 1.5x crop factor present)
FX--1.5x crop factor
Nikon D2-series, D3-series, D4-series, D200, D300/D300s, D700, D7000, D800/D800e
Pre-AI lenses--DO NOT USE!!
AI-Lenses--Will mount & meter (aperture-priority or manual modes), will also display the f-stop in the finder & allow "matrix" metering once you enter lens info in the "Shooting" menu
AF-D--Full functionality
AF-S--Full functionality
DX--work as intended (with 1.5x crop factor present) for all but D3/D4 series, no crop factor present but other limitations imposed with those
FX--no crop factor with D700, D800(e) & D3/D4 series, 1.5x crop factor present with others
Nikon D50, D70/D70s, D80, D90, D100
Pre-AI lenses--DO NOT USE!!
AI-Lenses--Will mount but will not meter, manual-mode only
AF-D--Full functionality
AF-S--Full functionality
DX--work as intended (with a 1.5x crop factor present)
FX--1.5x crop factor
Nikon D40, D40x, D60, D3000, D3100, D3200, D5000, D5100
Pre-AI lenses--Will mount but will not meter, manual-mode only
AI-Lenses--Will mount but will not meter, manual-mode only
AF-D--Manual focus, all metering functioning available
AF-S--Full functionality
DX--work as intended (with a 1.5x crop factor present)
FX--1.5x crop factor
External Links
Again, this is just a "cursory" explanation of the differences. Below are links which can help you understand this more, the 1st one especially.A Great Link That Explains The Differences in Detail, also has a camera/lens compatibility chart
Useful Camera Compatibility Article Which Helped/Inspired Me With the "Camera Compatibility" Overview Section
DPreview Posting, mounting a pre-AI 55mm f/3.5 on a D7000
Flickr Discussion on the topic
VERY handy link: Lens Database, This Page Is a HUGE Database of Practically Every Nikkor Lens Ever Made