Choose Sound Output Device on a Mac:
Now that I have beautiful Apple Cinema Display, I have the option to use either the included speakers or my headphones.
The Mac OS X 10.6 Help page on the topic explains how you can do this from the
System Preferences, which isn’t the quickest way.
But from a MacRumors forum post I found:
You simply hold alt and click the speaker icon on the status bar. Then, you can choose which output source u want.