The NES Zapper is a gun peripheral for the Nintendo Entertainment System. The zapper originally came in grey, but because the gun was said to be too easily mistaken as a real weapon, Nintendo released a redesigned orange version.
The zapper uses a light sensor to detect hits on-screen. When the trigger is pulled, the game will respond by blanking the screen for about 1 frame and painting the hitzones with white rectangles. When the zapper is pointing at a rectangle on-screen (or any other direct light source), it will signal to the NES that it is pointing at a lit region. From here, the game can determine which items on screen were hit.