You mean ROM hacks like Pokemon Naranja, or pirated editions of legitimate games?
ROM hacks don't really do anything, unless the ROM itself has a virus and you download it. Then again, why would anyone go to the extent of making a ROM hack just to stick a virus in it when they can get more people via a spam e-mail. ROM hacks are notoriously time consuming to construct, since each graphic, each line, each town etc. has to be constructed from scratch (but usually all the sprites etc. are readily available from the games the ROM is a hack of).
Pirated editions sometimes differ from their legitimate counterparts in terms of game play, or are excessively glitched as most are probably just a rip of the original ROM. There's also the problem with pirated copies of Gen V where the Pokemon don't gain experience, meaning you can't progress further than your starting town (it happens with ROMs too but there's a patch to fix that). Pirated copies in general are bugged & glitched, and you'll probably find things that aren't supposed to happen in normal games or your game freezing & crashing.
If you're asking what they do to your console, nothing in general. It's just the game itself that'll be compromised, so you might not be able to complete a game properly if you get a pirated edition. As for ROM hacks like Pokemon Naranja, they're just edited, sometimes heavily edited, versions of the games they're based on. The story line is different, but the graphics are pretty much the same to the version they're based on. For all intent and purposes, most ROM hacks are just a Pokemon game set in an alternate location.
You might find an older computer with less capacity struggling with running a ROM though; that's about it. However, don't buy cartridges of ROM hacks (e.g. Naranja), since they're made by bootleggers and it's illegal to profit from them (in addition to them being excessively bugged). If you want to play a ROM hack, download it.