What exactly is a Flash emulator, and how does it work?
A Flash Emulator is used in a system that normally keeps its program code in a FLASH memory chip. 

The emulator is a small piece of hardware that substitutes in place of the normal FLASH memory chip in a way to disable the normal FLASH and stands in place of its functionality. Sometimes the normal FLASH chip is unplugged and the emulator plugs into the chip socket. Other times the target board will have a special connector to which the emulator attaches. The act of plugging in the emulator disables the normal FLASH and enables then emulator. A third common type is connecting the emulator via a chip clip that clamps over the FLASH chip on the target board.

If the emulator is to pretend to be the FLASH to the board under test it has to supply memory that can contains program code for the processor on the board. This memory is usually in the form of RAM inside the adapter that has glue hardware between it and the FLASH interface to convert the normal FLASH read/write interface protocol to that required to access this RAM. In this manner the processor on the target board can fetch and execute code that is contained in RAM of the emulator.

The RAM from the emulator is also dual ported to a host accessible interface so that the RAM contents can be loaded. The host is often a PC type computer with cross compiler, assembler and linker tools that is capable of producing program images for the target MCU. The host computer then accesses the Flash emulator so that the code can be executed and tested on the target MCU. The interface between the host computer and the emulator may be a variety of different types including parallel port, USB, serial, or Ethernet. USB interfaces are in common use today.

These days in the embedded MCU world the use of actual Flash Emulators as described is becoming quite uncommon. Almost all mainstream MCUs have onboard FLASH memory and built in debug harware that allows remotely loading the FLASH. The debug hardware is the used to permit testing of the code as it executes. The debug interface to the MCU is a specialized set of pins that connect to a special downloader/debug pod. The host computer is normally connected to this debug pod via USB or Ethernet and special dedicated software on the host is used to do the FLASH programming and operate the debug interface in the target MCU.