Short for Read Only Memory, in this case referring to the phone's internal memory where your firmware and applications are stored. When people say they're flashing a new ROM, it means they are flashing a new version of the firmware on to their phone - the two terms are interchangeable.
What is STOCK ROM?
Stock ROM is the ROM default your mobile phone manufacturer. Sure there are some advantages offered, one of which stability. Stock ROM is a ROM that very carefully in a release through various experiments and lab by the manufacturer before it is actually released to the public.
What is CUSTOM ROM?
Custom ROM is a ROM derived from the Stock ROM, which tend to be fast in a release. To the extent that there are developers Custom ROM that gives the term "nightly" for the ROM is still trial and error phase, "RC (Release Candidate)" for the most stable ROM, as well as "stable" for the ROM which is considered to be almost the same stability when compared to parent ROM (Stock ROM).
Why do we use CUSTOM ROM?
Using a custom ROM usually results in more frequent updates that fix bugs and introduce new features because the developer behind the ROM doesn't have the same procedures and red tape that the manufacturer+carrier combo does.
A quality update can be churned faster because it doesn't involve the bureaucracy of 30 different project managers, 15 vice presidents, and 5 dozen marketing departments.
A ROM developer usually gains a loyal community which beta tests his updates in real life situations and provide feedback, or even fixes bugs - that's the beauty of open source software.
And that ROMs are usually free and supported by optional donations? If you can't afford to pay for it, you don't have to.
Finally, most custom ROMs out there are updateable over the air (OTA) and without reinstalling anything.
Better Performance And Efficiency
Custom ROMs are oftentimes faster, more efficient, and use less memory because:
the developer ripped out useless garbage, such as carrier installed apps or the developer optimized the kernel. For example, an undervolted kernel can provide a much better battery life than the stock one.
Ability To Install Apps To The SD Card
Most custom ROMs nowadays come with the ability to install applications to the SD card, called Apps2SD (or A2SD).
This is currently not possible on stock ROMs, even in Android 2.1 and is supposedly on Google's TODO list.
The Downsides Of Custom ROMs
In order to install a custom ROM, you need to perform a clean wipe.
This means you will lose all existing data, so you have to back everything up first.
Custom ROMs could have bugs… but then so do the stock ones.
However, in case you do find a bug, you actually have a 2-way channel of reporting it - post in the ROM forum and you will more than likely get an answer back and your bug acknowledged.
Try doing this to your phone manufacturer and see if you can get past the first level of outsourced monkeys, let alone actual developers.
You May Void Your Warranty
It's possible that custom rooting will void your warranty because you will "break the seal" on the boot loader by installing a custom rom , so double think when insalling a Custom Rom.