DNA-based storage works by converting binary data (0s and 1s) into a sequence of the four nucleotide bases. Specialized algorithms and encoding methods are used to ensure that the data can be accurately read and written. The synthesized DNA strands are then stored and can be read back using sequencing technologies.