When you delete a file (and empty the recycle bin) the actual file doesn’t get deleted.
What actually happens is that the OS removes the reference to the file from the File Allocation Table (FAT). This reference had the details such as where on the disk the file was. So when the Operating System doesn’t see this it marks that area of the disk as “free space”, but the data physically remains on the disk. Even though the data remains on the disk the OS believes it’s not there, thus the file remains on the disk until another file is created over it, and even after that it might be possible to recover data by studying the magnetic fields on the platter surface.
You can use software like PowerQuest "Lost and Found" or OnTrack "EasyRecovery Professional" to retrive the files you deleted, even if you reformatted the partition...
Here's some info about securely deleting your files
Securely Deleting Files
There are several software tools that will “securely” delete your files. Let’s examine them to see how they work. Rather than deleting your file normally you use a secure deletion tool to do the job. What it actually does is it removes the reference to the file (as Windows does). Then the tool inspects the clusters on which the data exists and overwrites them with random data which is determined by complex mathematic algorithms. One “pass” means overwriting the clusters once and will render most commercial recovery tools useless. However even one pass is considered weak as agencies such as the FBI or CIA (who have the money) can probably recover most of the data. 7 passes is what’s considered as “military” grade. As the number of passes increase the chance of actually recovering the file with today’s technology decreases close to an exponential rate. Most tools allow you to delete files using it, and also “wipe” free space – that is over writing clusters that were marked as free space. The more passes you select the longer it takes for the task to complete. Also note that most of the on the shelf tools require strict rules to operate. Basically the data you want to recover has to be “perfectly” there on the disk (even though it’s not referenced). Take that 14KB deleted file mentioned earlier and remember how we assumed it was stored on two clusters. Say that you saved another file, and it was saved on one of those clusters. Suddenly for most on the shelf tools that file can no longer be recovered although law enforcement agencies can still recover parts of the file and inspect it for vital evidence.
Your best chance of recovering a file is when it hasn't been deleted via a secure deletion tool and when you use a recover tool just after the file was deleted normally. The longer you wait the higher the chance that the operating system has placed a new file over the area you want recovered.
Formatting the hard disk simply re-creates the file system, again the old data remains on the disk (but the OS can't see it). Some recover tools can dig into "old" deleted partitions and recover the files that use to be in them.