When a file is deleted, it is removed from the computer's directory and is no longer accessible. The file's data is still stored on the hard drive, but it can only be recovered with special data recovery software. When a file is overwritten, it is replaced with new data, and the original file is completely erased and cannot be recovered.