Are you looking for an application to write? Because if not, OS X's built in Folder Actions combined with Automator or AppleScript are probably the easiest way to do that. Unfortunately in Leopard, Folder Actions are pretty flakey and not 100% reliable (sometimes not at all reliable), although some people have had success with them.
I imagine you could write an app in just about any language that will watch a folder for changes and do something when it finds new files in there, although the methods used for checking the folder may not be that efficient (polling), and you'd probably want something running as a faceless background application or daemon. You could also maybe attach something to a cron job that checks periodically, but again that may not be terribly efficient.
OS X's launchd services has a nifty feature that will launch one of your scripts when it detects a file system change. Unfortunately, they forgot to provide any mechanism for the called script to find out what part of the file system actually changed, making it almost useless unless you want your script called every time a file or folder is created, moved, renamed, deleted, modified.