Flash nand memory chips and how they write and read data to the Nand storage chip on them.
Use multiple voltage levels, when told to read, or write data a higher or lower pulse of voltage is sent.
If you can imagine for example 5v pulse = 1 and a voltage or current pulsed of 2.5v= 0
As the value then rapidly switching between 5v and 2.5 volts in a sequence would write a bit of data.
In binary example :5v, 5v ,2.5v.5v
In binary would be 1101. or a bit of data.
When you format a drive or a flash device it may send a voltage or a pulse of 1v to format the whole nand memory chip.
It why as a practice they always state after writing data to a flash drive that you never leave it connected to the system due to any power surges or glitches the Psu of the system may have.
Or leave the usb flash drive connected 24/7 to the system or usb port of it.