They use a device that reads all the cartridge information and convert it to 2 bin files (dumper), a .prg for program and a .chr for graphics. Then they put the 2 files together, pogramm a new mapper if necessary, add an iNES or UNIF header and release the ROM if they want.