It really depends on the file system and the kind of file. One way to destroy it is to fill it with random bytes, keeping the same exact size. Moreover, as the magnetic disk have residual magnetization which can be, in principle, read below the new bits, it's better to do it several times.
The problem of "final" removal of the file is much more complex than you may think. Just for example: POSIX (which is supported by Windows NTFS as well), you can create "hard links": several files in different places of the directory tree, but pointing to the same physical unit. When you delete one, other linked files remain the same. When you delete the last of the links (none of them is "main" one, they are all equal), the file is finally removed. But the physical unit is not really wiped, a reference to it is just removed from some structure. Please see:
http://en.wikipedia.org/wiki/Hard_link[
^]. This is only one aspect, as related to the file system API. To dig into detail, you should learn each file system separately; and I'm not sure if you have to.
—SA