Hello,
The answer to your question is partially based on the operating system you are using and the method used to initially format your hard drive. However, basically the OS informs the hard drive that the space used by your file is again available to have new files written to it. The data does not go anywhere and is normally left intact on the drive until something is written over the old information. There are several data recovery programs that can attempt to un-delete the data and some are very successful and can even recover files that have been written over. Most operating systems now a days include a Recycle Bin or Trash which holds on to the location of files you delete for a specific time, or until the space is needed or until you "Empty the Recycle Bin" and at that time they make the space available for new data to be written to.
As proof of the ability for hard drives to retain the data there are several applications available that will manually "Wipe" your data from the drive by writing over it several times to make the data inaccessible. There are even standards for what is referred to as Government level data erasure.
I hope this answers your question. If not Google it and you will get better information from real experts.