ROM hacking is where you download a copy of a Pokémon game and use a rom editor (e.g. Pokesav) to change aspects of the game.
For example, the sprites, maps, trainers, can all be changed relatively easily so you can end up with a game slightly different. However, seeing as all Pokémon games have similar plots, this is not usually a problem. Videos on YouTube can tell you methods for changing the game, and this is how games such as Chaos Black , Quartz, etc. have came about.