Formatting of a hard disk partition does not affect the data written on the sectors of a hard disk in any way. Formatting just creates the data storage structure on a disk, this is known as a file system. If you just format a hard disk drive partition, only the names of files registered in the File Allocation Table will be destroyed — your confidential data will remain in sectors of the hard disk.

Partitions existing on a disk are described in the Partition Table of the hard disk. Simple deleting a partition only makes the sectors of that partition to be considered unallocated. Files and data structures of the deleted partition remain intact. It is even easier to recover a deleted partition and all the files on it, than after formatting.