osascript in OS X executes AppleScripts and other Open Scripting Architecture (OSA) language scripts. This allows AppleScripts to be executed from the terminal as well.

The below command will tell Finder to display a dialog with the given message.

osascript -e 'tell app "Finder" to display dialog "Hi! From OS X. Steve Jobs is watching you."'

Since we can do this using a terminal, with a bit of creativity we can have pranks. :D