Data is stored on a hard drive, and a "look up" list is kept on the drive to "point" to each file.
When you delete a file from a hard disk it is only the entry in the "look up" list that is deleted, the file on the hard drive stays there (but is marked as deletable).
This is why SOME files can be recovered even after deletion.
However as other files use the hard disk they will overwrite these deleted files, so as Chuck says, you can only recover a file until another file is stored in its place.
Note: It is possible for the police and other agencies to retrieve information that HAS been deleted from a hard disk. I dont know how they do it, but they do need very specialized equipment.