NEF files are RAW photos taken with a Nikon camera. RAW files contain information specific to a specific camera model, so each RAW file is different. This can lead to problems when trying to open a NEF file in Photoshop - Photoshop needs to be updated in order for this graphics editor to support your camera model. If you are unable to update Photoshop, convert the file to DNG format, which is compatible with all versions of Photoshop.
Steps
Start

Step 1. Do not use Nikon Transfer to copy images to a computer
Older versions of this program may damage NEF files while copying them to your computer. It is better to use the operating system explorer.
Method 1 of 2: Update Photoshop

Step 1. Open Photoshop
The NEF file won't open in Photoshop because the version of the Photoshop Camera Raw plug-in doesn't include information for a specific camera model. Adobe updates the plugin regularly to support new models, but you may need to update the plugin manually.

Step 2. Determine the version of Photoshop
Open the Help menu and choose About Photoshop. The newer camera models are compatible with Adobe Photoshop CS6 and later.
If you are using Photoshop CS5 or earlier, you need to convert the file (see the next section)

Step 3. Update the Photoshop Camera Raw plug-in
Open the Help menu and select Updates. Select the Photoshop Camera Raw plug-in from the list and click Update.

Step 4. Restart Photoshop
After updating the plug-in, restart Photoshop for the changes to take effect. Try to open the NEF file.

Step 5. Check if your camera is supported
If you have the latest camera model, it may not yet be supported by the Photoshop Camera Raw plug-in. You can check supported Nikon models here.
If your camera is not supported, you need to convert the file in order to open it in Photoshop. Proceed to the next section
Method 2 of 2: Convert the file

Step 1. Understand why you need to convert files
NEF files are RAW photos that are specific to each Nikon model. In order to open an NEF file in Photoshop, you must have the latest version of the Photoshop Camera Raw plug-in. The newest version of this plugin does not support Photoshop CS5 or earlier, so converting the file is the only way to open it in Photoshop.
- You will be converting the file to DNG format, which can be opened in any version of Photoshop.
- You may need to convert the file if you have the latest version of Photoshop installed but the plugin does not support the latest camera model.

Step 2. Download Adobe DNG Converter
It is a free converter available for Windows and OS X. You can download it here.
Once the download is complete, run the installer to install the converter on your computer

Step 3. When the installation is complete, launch the converter

Step 4. Select the files you want to convert
To do this, in the first section, click "Select folder".
You can only select folders containing images, not individual images

Step 5. Set the folder where the converted images will be copied
By default, they will be saved in the same folder as the original images.

Step 6. Name the converted images
This can be done in the third section. By default, these images will be named the same as the original files, but with a.dng extension.

Step 7. Set compatibility preferences
Most users can leave these settings at their default, but if you're trying to convert an image to open in older versions of Adobe Photoshop, click Change Preferences and choose the version you want from the Compatibility menu.
If you want to embed a source NEF file into a DNG file, do so using the Settings menu. This will increase the size of the DNG file, but will allow you to later extract the NEF file (if needed)

Step 8. Start the conversion process
To do this, click "Convert". The conversion process will take some time, especially if you are converting many files at once.