A ROM is a digital copy of a game cartridge's data, and a Diddy Kong Racing ROM is simply that file for the Nintendo 64 title. The file itself is not inherently illegal; emulators are legal in many jurisdictions, and dumping a cartridge you own is generally treated differently from downloading one you do not.
Where the trouble starts is distribution. Sites offering free copies of commercial games are almost always infringing copyright, and downloading from them exposes you to both legal risk and a very high chance of bundled malware.
If you want to play the game legitimately, look for an official re-release or a second-hand cartridge and dump it yourself.