For simplicity's sake, I'll explain how I think systems use files.
We have a file named janebobble.jpg and listofidiots.txt
janebobble.jpg
listofidiots.txt
When I delete listofidiots.txt, it marks it as deleted.
janebobble.jpg
listofidiots.txt
When you add another file, it'll become..
janebobble.jpg
listofidiots.txt
mailbomb.exe
When you defrag it pushes files back to overwrite deleted files and organize crap.
janebobble.jpg
mailbomb.exe