Keeping a state
NAND flash is a form of nonvolatile memory: it retains stored information when power is removed. Its cells use stored electrical charge to represent information. This differs from ordinary dynamic random-access memory, or DRAM, which needs power to maintain its contents.
A solid-state drive combines flash with a controller and firmware. The controller helps organize access to the cells, so the device presents usable storage rather than an exposed collection of electronic components.
Memory for active work and storage for keeping files serve different roles.
More than the storage cells
Flash is managed in groups of cells. Reading, writing and erasing have different constraints. A controller can spread writing activity across the available storage and reclaim space that no longer contains current data. These background tasks help make the physical medium usable.
Imagine a hypothetical handheld note device. Working text might be held in volatile memory while a saved document is written to persistent storage. Switching off the device makes the distinction visible: an unsaved change and a saved file need not have the same outcome.
Nonvolatile does not mean permanent or indestructible. A storage mechanism alone cannot establish whether a particular file was saved successfully or will remain recoverable indefinitely. The useful questions are where the current information lives, when it is committed, and what other copies exist.
Further reading: Micron: how solid-state drives work.