With overlayfs, unchanged files are read from lower layers, and modifying a file copies it up into the writable upper layer first. Lower layers are never written in place, the upper layer stores real changes (not just logs), and the container filesystem is writable, not read-only.
Official docs