Both are described as memory on the chip, and I keep mixing up which one loses its contents.
Accepted answer
The key split is **volatile vs non-volatile**.
**RAM (Random Access Memory)** — volatile: contents are lost when power goes off. Read *and* write. It holds the OS, applications, and data currently in use, and it's what the CPU works from directly. More RAM means less swapping to disk.
**ROM (Read Only Memory)** — non-volatile: contents survive power off. Read only in normal operation. It holds the **bootstrap/BIOS** — the small program that runs at start-up and loads the OS from secondary storage into RAM.
The exam-favourite chain: power on → CPU runs the bootstrap **from ROM** → bootstrap loads the OS **from secondary storage into RAM** → the system is usable.
Don't confuse either with **secondary storage** (HDD/SSD). That's also non-volatile, but it's for long-term files, is far larger and slower, and isn't accessed directly by the CPU.