We need some additional details before we will be able to help you with this question. Which emulator are you using? Are you trying to use a USB controller, or the keyboard?
Assuming you're running Nestopia on windows and trying to use a USB controller: 0. Close Nestopia if running. 1. Unplug, the re-plug in USB controller and wait for windows to recognize it. 2. Start Nestopia. 3. In Nestopia, go to "Options" -> "Input". 4. In the "Type" menu select "Pad 1". This sets the controls for Player 1. 5. In the "Joysticks" drop-down menu, select "USB Controller 1" or whichever controller you are trying to configure. -----a. You may have to experiment to find the right controller 6. In the lower-center of the window, click "Set All". 7. One at a time, for each key in the "Key" menu (starting with "Left"), press the correct key/button on the controller. 8. Repeat for "Pad 2" (player 2) if desired/applicable. 9. Load the rom from the file menu. 10. Enjoy!