The in camera distortion control works with only Nikon lenses that have been profiled by Nikon for the distortion control database. This bit of firmware is updated periodically and can be installed in the camera via the usual firmware update process. The database is also used by Nikon software.
Newer Nikkors are in the database, older ones are not.
If you shoot JPG, the camera will apply the distortion control and "bake it in" to the image.
If you shoot RAW, and use non-Nikon software for post processing, the information is ignored, so the setting in camera doesn't matter. The software's own lens correction capabilities can be used instead.
If you shoot RAW and use Capture NX2 or View NX2 as your image editor, the distortion control will be applied automatically by the software. In CNX, you can then turn it off, or "un-apply" it, if you wish.
2 of my 3 Nikon's have distortion control capability. I leave it on all the time as it seems to do a good job. I shoot RAW and use CNX. For the 3rd body (a D3s) I apply distortion control in CNX, it just isn't automatic, I need to click once on a checkbox.