To simplify, let's use CD ROM as example. CD ROM data can't be
edited after it's been burned to a CD. That's the idea of a ROM.
Yes, it means it can only be read, cannot be
edited.
EPROM, is slightly different. It is still read-only, however, it
can edited, only under certain conditions. That certain condition
is: It must be exposed to UV Ray. After exposing it to UV Rays, all
data will be gone. To prevent accidental data loss, they are
usually covered by some foil.
How ROM works... well... exact details I don't know, I'm not an
engineer.
You can check out this
article on how ROM works.
A summary of what ROM is
1. It stands for Read Only Memory. Data may be read, but not
edited.
2. It's a type of non-volatile memory. That means even if power is
removed from it, the data will still be preserved.
3. Even if it can be edited, certain conditions have to be met. In
the example of EPROM, it has to be exposed to UV Rays for data to
be erased, re-programmed and saved.