A symbolic link is a small file that contains the location (i.e. path and filename) of a target file, with a flag in the directory entry indicating that it's a symlink.
When you open a symlink, the OS will follow the location to find the target file. If the target is itself a symlink, it follows its location as well (1)(2) until the location points to a file that's not a symlink (let's call it the FinalFile). Then the OS obtains the inode of the FinalFile (the inode contains metadata like modification-time and has also a pointer to the file's data). Finaly the inode of the FinalFile is opened. From now on the process uses that inode to read/write to the file. As a result changing the symlink name or path, deleting the symlink, changing the path or the name of the FinalFile or even deleting the FinalFile(3) has no effect on the process; it's still reading from the same inode.
In most cases file-data operations on the symlink will affect the DestinatioFile (e.g. reading and writing to the symlink will read from/write to the FinalFile) but there are exceptions: the
readlink() system call reads the contents of the symlink itself.
File-metadata operations (like rename or delete) on the other hand will usually affect the symlink. But there are exceptions here as well: the
lstat() system call is like
stat(), except that it returns information on the symlink itself rather than on the FinalFile(2).
(1) there's a limit on the number of levels and things get a bit more complex if the location in the symlink is a relative path.
(2) Read symlink(7): symbolic link handling for more details.
rm command or the
unlink() system call doesn't physically remove a file; it removes the directory entry that point to the inode of the file. The file itself is removed only if both a) there are no more directory entries (hard links) that refer to it's inode and b) no process has the file open.