Originally, NES games were dumped by removing the ROM(s) from the cartridge and rewiring them to be read in an EPROM programmer. There's a device called CopyNES which is around now, that makes dumping roms MUCH easier.
There are 2 buses on the cartridge, so there are 2 chips. One is the PRG-ROM, the code that the CPU runs. The other is the CHR-ROM (or CHR-RAM with some carts), where the PPU get's the graphic data.
An iNES file is like this:
16 byte iNES header
8Kx* CHR-ROM (uses CHR-RAM if this is zero)