Basically you need some code to do what each chip in the original hardware does.
This could include a CPU, sound processor and/or graphics processor.
The particular chips will depend on the system.
At the simplest level, an emulator will just store the state of the system (memory and register contents etc.) and manipulate it each emulated cycle.
This will involve reading the next instruction, and doing what it says.
Graphics and Sound chips are usually sent commands by the CPU, and do more specific tasks (for example, blit a sprite, or produce a sine wave).
You only need to reverse engineer a system if there is no existing documentation available, or if it's incomplete.
If the system has multiple high compatibility emulators available, there's probably already documentation if you ask the devs.
But for to emulate a system which hasn't been done before, then you'd need to reverse engineer it.
Although if you already know it's a MIPS chip, for example, you already have a good idea about the instruction set and architecture.
I might recommend
Chip-8 if you want to try writing an emulator.
It's not technically a real chip, but it's very simple while still having many interesting programs to test.
At the absolute simplest, you could make a
Manchester "Baby" emulator.
It was the first stored program computer, and it only has 7 instructions!
(Disclaimer: I have never coded an emulator myself)