ROMs are copies of the read-only memory contained in game cartridges or disks. They are a full copy of the game, excluding save files which aren't read-only memory. Roms have been known to be run using an Emulator on a computer.
The legality of ROMs being stored in a device, besides the original cartridge or disk, differs between countries.
In the U.S., it was decided in the court case of Atari v. JS&A, that it is illegal for one to create ROM backups of their video games onto other cartridges.