John mentioned the two main routes you can take for watching files under Unix/Linux systems: notification and polling.
Notification is when the system itself (usually the kernel) triggers a message to registered applications whenever the file is accessed or written to. This approach requires a compliant system and might not be available on older machines.
The primary implementation of notification under Linux is inotify, which is built into kernels 2.6.13 and later and can be patched into 2.6.12 and earlier. There's a nice IBM guide on using inotify as well as a basic set of tools and C library for accessing inotify.
Polling is when your program repeatedly checks a file at intervals to see if anything about that file - its size, last modification time, owner, etc. - has been changed.
There's no standard implementation of this, as it's written on a program-level rather than system-level basis, although the system call poll exists and seems to do something useful for this purpose (the man page says it's similar to select, and it waits for an event to become available on a file descriptor). You could also take the more basic approach with stat and do your checking on your own.