In case of power failure, how the ROM will store the data?
Most rewritable ROM (a contradictio in terminis) today is Flash. It stores the data as an electrical charge on a floating gate, which is embedded in Silicon dioxide, one of the best insulators there are. So the charge can't leak away from the gate, and can be held for tens of years. If you switch the power off the charge will still be there.

If you don't need to change the data then for large volumes mask-programmable ROM may be chosen. An IC like a microcontroller has one or more interconnection layers to connect the transistors. In a mask-programmable ROM the mask defines which bits will be read as a 1, and which as a 0. They're part of the IC's hardware, and won't change when powered off.

drxzl mentions the ancient Fusible-Link ROM, but that's becoming rare because of its cost, and the low density. Flash costs about 1 dollar per gigabit, Fusible-Link will be a multiple of that. Though the technology isn't perfect (there's the fenomenon of link regrowth in nichrome fuses) it may still be used in some cases where high reliability is a premium.

Further reading
Data retention on a microcontroller