A floppy disk actually goes through two formatting steps: Low-level formatting, and high-level formatting. The low-level format marks out where the tracks begin and end, and where the sectors are in each track. The high-level format then writes out the boot track, the File Allocation Table (FAT), and the root directory.
If you do a "quick" format in DOS, then only the high-level format is done.
The formatting process does not actually overwrite every bit on the disk, so it is possible to retrieve data that was previously written on a floppy before it was formatted. It is a difficult and expensive process, but it can be done.
If you are trying to erase all of the contents of a floppy, then you'd need to overwrite every bit on the disk, and rewrite a series of patterns on it, to ensure that the data is fully erased.