1. Emulate the whole system. 2. Emulate the system API.
The first one you write the code to emulate the CPU of target system like OP code interpreter (e.g. NES). The second one you write the code to re-implement the API of the target system (e.g. Wine). For the second one you may need to write a JIT compiler if the target system use a different CPU architecture (e.g. PS3).
Most modern console emulator are the later one because how the modern console work is similar to how the PC work. It have an OS kernel and a user-mode libraries for applications.
For the latter one there are 2 kind of it. The first one is emulate the user-mode libraries and the second one is re-implement the console kernel and reuse the system libraries from the console itself.
And additionally because the past couple of console generations have had x86-64 CPUs, there's no need to do full instruction translation/emulation—something like Wine would suffice.
http://www.emulator101.com/introduction-to-chip-8.html
An average programmer can probably get an emulator for that running in a weekend, and there are lots of guides and documetnation out there for the opcodes and similar.
NES / Gameboy / GameGear / similar are probably well-documented, but they will be harder at least because the processors have more opcodes you have to care about.
Also somehow for some reason i was convinced back then that mobile phones in the future will have a CHIP8 emulator to play games :-P. Sadly(?) they got Java instead.
You are bound to have an awesome game you can find on an 8-bit system and it's really fun trying to get to the point where you can play the game: getting the logo to appear, getting the title screen up, getting the sprites working, adding controls etc.
The "big league" emulators work differently. They may be simple compilers. Instead of compiling C code or java code, they compile machine code from system A to system B. A transpiler. This affords speed beyond the simple case. Speed, however, is only necessary if the machine running the emulator is weak, or if the machine being emulated is strong.