When you format a hard drive, you're deleting all the information it contains and then creating new file system structures to hold the information that will be stored on that disk. When you reformat an existing partition or volume, that causes all the existing data to be erased (or "overwritten") with null values. The criteria for erasure are defined in the international standard for digital information interchange, ISO/IEC 15408-1.

The program you use to format your computer's hard drives isn't much different from the programs you use to write data to the drive. Your operating system must have a utility program that can write zeros or random data to one or more entire disks, wiping out all current data on those disks. This process is referred to as "low-level formatting." Once it has been erased this way, any partitions, volumes, directories, and files you create will be built on top of the zeroed-out disk structure. Thus each sector or cluster of each disk contains either byte with null values (0) or actual file data.
When a drive is formatted, all of its data is erased. All the data on the device is deleted, and new data and file systems are allowed to take their place. There are several possible reasons for formatting a disk. You might be concerned about security, need to re-purpose the hardware, or desire to employ a different file system on your gadget. Or you could be attempting to repair some serious technical problems.

HOW TO FORMAT A HARD DRIVE IN WINDOWS

To format a hard drive in Windows, open the Start menu and click on "Control Panel".
Click on the System icon. It might be called "Performance and Maintenance" or some variation of that.
Click on Administrative Tools if it's available. If not, you can probably find it under Performance and Maintenance. Look for an entry that says Computer Management or Storage or something similar to access its contents.
In the Computer Management window, find and double-click on Disk Management under Storage or Disk Management in System Tools.
This will open a list of disk drives installed in your system. If you have more than one drive listed here, you can select one from the list at the bottom to access that drive's format options.
Click on a drive from this list to select it as an active drive for formatting. You'll then see its partition(s) listed along with its file system type. Depending on what kind of information is stored on that device, there may not be any partitions listed until you select each partition individually and click "Format."

HOW TO FORMAT A HARD DRIVE ON MAC

First, open up Disk Utility under Utilities in your Applications.
To format the entire hard drive, click on the name of the disk itself (not any partitions). Be sure that all information is backed up before you do this because everything on that drive will be deleted.
Next press "Erase" at the top of the window to begin formatting. If you want to use a file system other than Mac OS Extended (Journaled), go back and select "Format" another way.
If you choose anything except Mac OS Extended (Journaled) or File Allocation Table (FAT) for your file system, make sure you've done your research beforehand, because this will affect your ability to share information with other devices.