In volatile memory, the memory contents are lost when the power supply is interrupted. Typically, the main memory of a computer is volatile. Data is held in integrated circuits (IC) and is refreshed periodically by supplying the circuits with current pulses.
In non-volatile memory the contents are retained even without the supply of power. Non-volatile storage media are special read-only (ROM) integrated circuits, magnetical, magneto/optical, or optical media. ROM chips are programmed by applying a strong current to the individual memory locations which burn a specific pattern into the chip (there also exist programmable ROM chips whose contents can be erased through ultraviolet light and reprogrammed with strong currents). In magnetic media, the magnetic stratum is polarised by a magnetising current, and this polarisation remains after the current has been switched off. In magneto-optical media, the data itself is held in the magnetic stratum; the optical tracks are used for a precise control of the read and write head. In optical media, different degrees of reflectivity of a stratum are exploited to store data. Data is written to the medium either by burning or by mechanically pressing a pattern into the optical stratum.