Well, on *nix machines like Macs, there are two kinds of links:
soft or
symbolic links (what Mac OS X calls
aliases and Windows calls
shortcuts) and
hard links.
Soft links behave similarly to files, and refer to another file on the computer. For example, if you created a link (alias) to an application in
/Applications on your desktop, double-clicking the alias would cause the application to open. If you delete the application, the link will remain on your desktop, but double-clicking will do nothing.
However, if you move the application to another folder on the same drive, the link will just update to point to the new location.
When a program opens a file, it behaves just like it created a soft link. For a demonstration of how this works for applications, try creating a new document in TextEdit. Save it to your desktop as "Foo.rtf". Then, with TextEdit still open, use Finder to rename the file on your desktop to "Bar.rtf". When you activate TextEdit again, the filename in the title bar will be updated, and saving again will prompt you to save under the new name. (This doesn't work in Windows, since Windows deals with files differently.)
Hard links
are files as far as the operating system is concerned. The filenames and locations of all files are saved to the
filesystem, which is a set of information located on one small part of the hard drive. The rest of the hard drive contains raw data, and each file mentioned in the filesystem points to a certain physical spot on the hard drive where its contents can be found. This means that the operating system doesn't have to read the entire drive every time you open a directory, and it doesn't have to rearrange the contents of the drive if you move or edit a file.
Normally, each file saves its data to a different physical spot on the drive. However, creating a hard link creates an entry in the filesystem that points to the same data as another file. The benefit of this is that large files don't end up taking up additional space if copied and edits to one file will affect the other(s). The big difference between hard and soft links is that hard links continue to work if the original document has been deleted, because they point to the actual data rather than to another file.
Now, if I copy a file rather than creating a link, the data will be copied to a different location on the drive. It starts out with the same attributes and contents, just like if I'd created a hard link, but the two files are no longer associated in any way, and I can edit one file without affecting the other. What's more, I can
delete one file without affecting the other, but still breaking any soft links that might be pointing to the original.
Try the TextEdit experiment again, but by copying rather than renaming. Save the file Foo.rtf,
copy it and rename the copy to Bar.rtf, then delete Foo.rtf and empty the trash. As far as you're concerned, you have done exactly the same thing as if you'd renamed the file, but when you go to save in TextEdit, it will tell you that it can no longer find the file Foo.rtf. You've broken the link that TextEdit had with the file, which means that it can no longer read from or write to the data saved on your computer.
More info:
http://en.wikipedia.org/wiki/Symbolic_link
http://en.wikipedia.org/wiki/Hard_link
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/ln.1.html