A "ROM" stands for Read Only Memory, which is a misnomer for the flash memory in smartphones. What the term "rom" represents is a collection of files that are flashed to the phone's static memory that encompass the operating system, kernel and radio drivers that make the thing work. A custom rom will replace whatever version of Android your phone shipped with providing you with extra features, a more current version or customization options not in the original ... or any combination of those. It also is not usually loaded with carrier based apps that many consider bloat.
Just a note that you must use a rom specifically made for your EXACT model of phone or you could run the risk of bricking it. A 'soft' brick is usually recoverable to an operating state. A hard brick is a $600 doorstop.