ROM is the the part of the phone’s internal storage that is inaccessible to the user. It is called Read Only Memory, meaning the user cannot use it to store their files. Mostly, it is composed of operating system be it Android or iPhone and its utilities. The whole storage media, that is the ROM and the space left for you to keep your files after installation of the operating system together form the internal storage.
These two are often confused especially by some phone sellers who make it hard for users to differentiate. More than twice have I sold phones to customers and they came complaining that the storage was not the as promised.
Of course if the internal is 32GB for example, the ROM will take some space, let us say 5GB and you will be left with 27GB. So when you view internal storage, you will see only 27GB usable but the total will be 32, because part of it has already been used to house system files.
Most modern phones come with a flushable type of ROM called EEPROM. That is why you can take your phone to an expert to flash out and install an new version of the OS if the software is having issues such as inability to launch camera, cannot adjust brightness among others.